mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:36:01 +08:00
Fix material settings saving upon dialog close
CURA-4606 Force to trigger a lose focus on all editing fields so their onEditingFinished callback will get triggered.
This commit is contained in:
parent
5950d147ac
commit
31b7374689
@ -47,6 +47,19 @@ TabView
|
||||
return Math.round(diameter);
|
||||
}
|
||||
|
||||
// This trick makes sure to make all fields lose focus so their onEditingFinished will be triggered
|
||||
// and modified values will be saved. This can happen when a user changes a value and then closes the
|
||||
// dialog directly.
|
||||
//
|
||||
// Please note that somehow this callback is ONLY triggered when visible is false.
|
||||
onVisibleChanged:
|
||||
{
|
||||
if (!visible)
|
||||
{
|
||||
base.focus = false;
|
||||
}
|
||||
}
|
||||
|
||||
Tab
|
||||
{
|
||||
title: catalog.i18nc("@title", "Information")
|
||||
|
Loading…
x
Reference in New Issue
Block a user