mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 00:07:51 -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.globalContainerChanged.connect(self._update)
|
||||||
machine_manager.outputDevicesChanged.connect(self._update)
|
machine_manager.outputDevicesChanged.connect(self._update)
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def forceUpdate(self):
|
||||||
|
self._update()
|
||||||
|
|
||||||
def _update(self) -> None:
|
def _update(self) -> None:
|
||||||
self.clear()
|
self.clear()
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import Cura 1.0 as Cura
|
||||||
UM.Dialog
|
UM.Dialog
|
||||||
{
|
{
|
||||||
property var manager
|
property var manager
|
||||||
|
property var compatible_machine_model: Cura.CompatibleMachineModel {}
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
title: catalog.i18nc("@title:window", "Select Printer")
|
title: catalog.i18nc("@title:window", "Select Printer")
|
||||||
|
@ -65,7 +65,11 @@ UM.Dialog
|
||||||
color: UM.Theme.getColor("text_link")
|
color: UM.Theme.getColor("text_link")
|
||||||
hoverColor: UM.Theme.getColor("text_scene_hover")
|
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
|
id: contents
|
||||||
|
|
||||||
model: Cura.CompatibleMachineModel {}
|
model: base.compatible_machine_model
|
||||||
|
|
||||||
delegate: Cura.PrintSelectorCard
|
delegate: Cura.PrintSelectorCard
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue