mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Fix refresh of ChoosePrinterDialog not working
CURA-9278
This commit is contained in:
parent
017560480a
commit
1dc42cb69a
2 changed files with 11 additions and 3 deletions
|
@ -31,6 +31,10 @@ class CompatibleMachineModel(ListModel):
|
|||
machine_manager.globalContainerChanged.connect(self._update)
|
||||
machine_manager.outputDevicesChanged.connect(self._update)
|
||||
|
||||
@pyqtSlot()
|
||||
def forceUpdate(self):
|
||||
self._update()
|
||||
|
||||
def _update(self) -> None:
|
||||
self.clear()
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import Cura 1.0 as Cura
|
|||
UM.Dialog
|
||||
{
|
||||
property var manager
|
||||
|
||||
property var compatible_machine_model: Cura.CompatibleMachineModel {}
|
||||
id: base
|
||||
|
||||
title: catalog.i18nc("@title:window", "Select Printer")
|
||||
|
@ -65,7 +65,11 @@ UM.Dialog
|
|||
color: UM.Theme.getColor("text_link")
|
||||
hoverColor: UM.Theme.getColor("text_scene_hover")
|
||||
|
||||
onClicked: manager.refresh()
|
||||
onClicked:
|
||||
{
|
||||
manager.refresh()
|
||||
base.compatible_machine_model.forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +77,7 @@ UM.Dialog
|
|||
{
|
||||
id: contents
|
||||
|
||||
model: Cura.CompatibleMachineModel {}
|
||||
model: base.compatible_machine_model
|
||||
|
||||
delegate: Cura.PrintSelectorCard
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue