mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Moved the BlurSettings signal to cura main window
This reduces the number of focus changes from O(N) to O(1) by the blur event
This commit is contained in:
parent
b8f9535e74
commit
3e4ff9241e
2 changed files with 11 additions and 9 deletions
|
@ -506,6 +506,17 @@ UM.MainWindow
|
|||
onTriggered: preferences.getCurrentItem().showProfileNameDialog()
|
||||
}
|
||||
|
||||
// BlurSettings is a way to force the focus away from any of the setting items.
|
||||
// We need to do this in order to keep the bindings intact.
|
||||
Connections
|
||||
{
|
||||
target: Cura.MachineManager
|
||||
onBlurSettings:
|
||||
{
|
||||
contentItem.focus = true
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for shortcuts not working for singletons.
|
||||
// The main window eats all the events, so we need to pass them manually.
|
||||
Action
|
||||
|
|
|
@ -248,14 +248,5 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.MachineManager
|
||||
onBlurSettings:
|
||||
{
|
||||
revertButton.focus = true
|
||||
}
|
||||
}
|
||||
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue