mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
[KBM Editor] Remove UpdateLayout calls from shortcut UI (#12857)
* [KBM Editor] Remove updatelayout from shortcut UI * Restore some UpdateLayout
This commit is contained in:
@@ -186,7 +186,6 @@ std::pair<ShortcutErrorType, int> KeyDropDownControl::ValidateShortcutSelection(
|
||||
parent.Children().RemoveAtEnd();
|
||||
keyDropDownControlObjects.erase(keyDropDownControlObjects.end() - 1);
|
||||
}
|
||||
parent.UpdateLayout();
|
||||
}
|
||||
|
||||
// If ignore key to shortcut warning flag is true and it is a hybrid control in SingleKeyRemapControl, then skip MapToSameKey error
|
||||
@@ -215,7 +214,6 @@ std::pair<ShortcutErrorType, int> KeyDropDownControl::ValidateShortcutSelection(
|
||||
|
||||
// delete drop down control object from the vector so that it can be destructed
|
||||
keyDropDownControlObjects.erase(keyDropDownControlObjects.begin() + dropDownIndex);
|
||||
parent.UpdateLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,7 +323,6 @@ void KeyDropDownControl::AddDropDown(StackPanel& table, StackPanel row, StackPan
|
||||
uint32_t index;
|
||||
bool found = table.Children().IndexOf(row, index);
|
||||
keyDropDownControlObjects[keyDropDownControlObjects.size() - 1]->SetSelectionHandler(table, row, parent, colIndex, shortcutRemapBuffer, keyDropDownControlObjects, targetApp, isHybridControl, isSingleKeyWindow);
|
||||
parent.UpdateLayout();
|
||||
|
||||
// Update accessible name
|
||||
SetAccessibleNameForComboBox(keyDropDownControlObjects[keyDropDownControlObjects.size() - 1]->GetComboBox(), (int)keyDropDownControlObjects.size());
|
||||
@@ -413,8 +410,6 @@ void KeyDropDownControl::AddShortcutToControl(Shortcut shortcut, StackPanel tabl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parent.UpdateLayout();
|
||||
}
|
||||
|
||||
// Get number of selected keys. Do not count -1 and 0 values as they stand for Not selected and None
|
||||
|
||||
@@ -225,7 +225,6 @@ void ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, std::vector<s
|
||||
}
|
||||
|
||||
children.RemoveAt(rowIndex);
|
||||
parent.UpdateLayout();
|
||||
shortcutRemapBuffer.erase(shortcutRemapBuffer.begin() + rowIndex);
|
||||
// delete the SingleKeyRemapControl objects so that they get destructed
|
||||
keyboardRemapControlObjects.erase(keyboardRemapControlObjects.begin() + rowIndex);
|
||||
@@ -244,7 +243,6 @@ void ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, std::vector<s
|
||||
deleteShortcutContainer.Orientation(Orientation::Vertical);
|
||||
deleteShortcutContainer.VerticalAlignment(VerticalAlignment::Center);
|
||||
row.Children().Append(deleteShortcutContainer);
|
||||
parent.UpdateLayout();
|
||||
|
||||
// Set accessible names
|
||||
UpdateAccessibleNames(keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][0]->GetShortcutControl(), keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][1]->GetShortcutControl(), targetAppTextBox, deleteShortcut, (int)keyboardRemapControlObjects.size());
|
||||
|
||||
Reference in New Issue
Block a user