mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Force setting fields to update when discarding changes
Textfields that have the focus don't (always) update when a new value is set. CURA-1585
This commit is contained in:
parent
1d89e8c6a9
commit
a545cde4a8
2 changed files with 15 additions and 1 deletions
|
@ -61,7 +61,9 @@ class MachineManagerModel(QObject):
|
|||
activeStackChanged = pyqtSignal()
|
||||
|
||||
globalValueChanged = pyqtSignal() # Emitted whenever a value inside global container is changed.
|
||||
globalValidationChanged = pyqtSignal() # Emitted whenever a validation inside global container is changed.
|
||||
globalValidationChanged = pyqtSignal() # Emitted whenever a validation inside global container is changed
|
||||
|
||||
blurSettings = pyqtSignal() # Emitted to force fields in the advanced sidebar to un-focus, so they update properly
|
||||
|
||||
@pyqtProperty("QVariantMap", notify = globalContainerChanged)
|
||||
def extrudersIds(self):
|
||||
|
@ -212,6 +214,7 @@ class MachineManagerModel(QObject):
|
|||
if not self._active_container_stack:
|
||||
return
|
||||
|
||||
self.blurSettings.emit()
|
||||
user_settings = self._active_container_stack.getTop()
|
||||
user_settings.clear()
|
||||
|
||||
|
@ -299,6 +302,7 @@ class MachineManagerModel(QObject):
|
|||
new_container_id = self.duplicateContainer(self.activeQualityId)
|
||||
if new_container_id == "":
|
||||
return
|
||||
self.blurSettings.emit()
|
||||
self.setActiveQuality(new_container_id)
|
||||
self.updateQualityContainerFromUserContainer()
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import QtQuick.Controls 1.1
|
|||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
import "."
|
||||
|
||||
|
@ -245,5 +246,14 @@ 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