mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 14:35:56 +08: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
@ -506,6 +506,17 @@ UM.MainWindow
|
|||||||
onTriggered: preferences.getCurrentItem().showProfileNameDialog()
|
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.
|
// Workaround for shortcuts not working for singletons.
|
||||||
// The main window eats all the events, so we need to pass them manually.
|
// The main window eats all the events, so we need to pass them manually.
|
||||||
Action
|
Action
|
||||||
|
@ -248,14 +248,5 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections
|
|
||||||
{
|
|
||||||
target: Cura.MachineManager
|
|
||||||
onBlurSettings:
|
|
||||||
{
|
|
||||||
revertButton.focus = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user