mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 18:49:02 +08:00
Fix refresh of ChoosePrinterDialog not working
CURA-9278
This commit is contained in:
parent
017560480a
commit
1dc42cb69a
@ -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…
x
Reference in New Issue
Block a user