mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
CURA-4870 Remove dinamic connections to the signals in the machine
model. The model is still updated when the container changed.
This commit is contained in:
parent
b3f9679a5f
commit
fa2b5f141c
1 changed files with 0 additions and 11 deletions
|
@ -42,18 +42,9 @@ class MachineManagementModel(ListModel):
|
|||
if isinstance(container, ContainerStack):
|
||||
self._update()
|
||||
|
||||
## Handler for container name change events.
|
||||
def _onContainerNameChanged(self):
|
||||
self._update()
|
||||
|
||||
## Private convenience function to reset & repopulate the model.
|
||||
def _update(self):
|
||||
items = []
|
||||
# Remove all connections
|
||||
for container in self._local_container_stacks:
|
||||
container.nameChanged.disconnect(self._onContainerNameChanged)
|
||||
for container in self._network_container_stacks:
|
||||
container.nameChanged.disconnect(self._onContainerNameChanged)
|
||||
|
||||
# Get first the network enabled printers
|
||||
network_filter_printers = {"type": "machine", "um_network_key": "*", "hidden": "False"}
|
||||
|
@ -65,7 +56,6 @@ class MachineManagementModel(ListModel):
|
|||
if container.getBottom():
|
||||
metadata["definition_name"] = container.getBottom().getName()
|
||||
|
||||
container.nameChanged.connect(self._onContainerNameChanged)
|
||||
items.append({"name": metadata["connect_group_name"],
|
||||
"id": container.getId(),
|
||||
"metadata": metadata,
|
||||
|
@ -81,7 +71,6 @@ class MachineManagementModel(ListModel):
|
|||
if container.getBottom():
|
||||
metadata["definition_name"] = container.getBottom().getName()
|
||||
|
||||
container.nameChanged.connect(self._onContainerNameChanged)
|
||||
items.append({"name": container.getName(),
|
||||
"id": container.getId(),
|
||||
"metadata": metadata,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue