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();
|
parent.Children().RemoveAtEnd();
|
||||||
keyDropDownControlObjects.erase(keyDropDownControlObjects.end() - 1);
|
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
|
// 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
|
// delete drop down control object from the vector so that it can be destructed
|
||||||
keyDropDownControlObjects.erase(keyDropDownControlObjects.begin() + dropDownIndex);
|
keyDropDownControlObjects.erase(keyDropDownControlObjects.begin() + dropDownIndex);
|
||||||
parent.UpdateLayout();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,7 +323,6 @@ void KeyDropDownControl::AddDropDown(StackPanel& table, StackPanel row, StackPan
|
|||||||
uint32_t index;
|
uint32_t index;
|
||||||
bool found = table.Children().IndexOf(row, index);
|
bool found = table.Children().IndexOf(row, index);
|
||||||
keyDropDownControlObjects[keyDropDownControlObjects.size() - 1]->SetSelectionHandler(table, row, parent, colIndex, shortcutRemapBuffer, keyDropDownControlObjects, targetApp, isHybridControl, isSingleKeyWindow);
|
keyDropDownControlObjects[keyDropDownControlObjects.size() - 1]->SetSelectionHandler(table, row, parent, colIndex, shortcutRemapBuffer, keyDropDownControlObjects, targetApp, isHybridControl, isSingleKeyWindow);
|
||||||
parent.UpdateLayout();
|
|
||||||
|
|
||||||
// Update accessible name
|
// Update accessible name
|
||||||
SetAccessibleNameForComboBox(keyDropDownControlObjects[keyDropDownControlObjects.size() - 1]->GetComboBox(), (int)keyDropDownControlObjects.size());
|
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
|
// 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);
|
children.RemoveAt(rowIndex);
|
||||||
parent.UpdateLayout();
|
|
||||||
shortcutRemapBuffer.erase(shortcutRemapBuffer.begin() + rowIndex);
|
shortcutRemapBuffer.erase(shortcutRemapBuffer.begin() + rowIndex);
|
||||||
// delete the SingleKeyRemapControl objects so that they get destructed
|
// delete the SingleKeyRemapControl objects so that they get destructed
|
||||||
keyboardRemapControlObjects.erase(keyboardRemapControlObjects.begin() + rowIndex);
|
keyboardRemapControlObjects.erase(keyboardRemapControlObjects.begin() + rowIndex);
|
||||||
@@ -244,7 +243,6 @@ void ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, std::vector<s
|
|||||||
deleteShortcutContainer.Orientation(Orientation::Vertical);
|
deleteShortcutContainer.Orientation(Orientation::Vertical);
|
||||||
deleteShortcutContainer.VerticalAlignment(VerticalAlignment::Center);
|
deleteShortcutContainer.VerticalAlignment(VerticalAlignment::Center);
|
||||||
row.Children().Append(deleteShortcutContainer);
|
row.Children().Append(deleteShortcutContainer);
|
||||||
parent.UpdateLayout();
|
|
||||||
|
|
||||||
// Set accessible names
|
// Set accessible names
|
||||||
UpdateAccessibleNames(keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][0]->GetShortcutControl(), keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][1]->GetShortcutControl(), targetAppTextBox, deleteShortcut, (int)keyboardRemapControlObjects.size());
|
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