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:
Jaime van Kessel 2016-07-18 15:38:57 +02:00
parent b8f9535e74
commit 3e4ff9241e
2 changed files with 11 additions and 9 deletions

View file

@ -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

View file

@ -248,14 +248,5 @@ Item {
}
}
Connections
{
target: Cura.MachineManager
onBlurSettings:
{
revertButton.focus = true
}
}
UM.I18nCatalog { id: catalog; name: "cura" }
}