mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Add group_id and fix remove printer
CURA-6483 - Added a unique group_id (a GUID) to all created GlobalStack. - Changed version upgrade to generate unique group_ids for GlobalStacks. - RemoveMachine() now uses group_ids to remove hidden GlobalStacks.
This commit is contained in:
parent
56c0cae71f
commit
d16da3da3a
3 changed files with 16 additions and 3 deletions
|
@ -4,6 +4,8 @@
|
|||
from collections import defaultdict
|
||||
import threading
|
||||
from typing import Any, Dict, Optional, Set, TYPE_CHECKING, List
|
||||
import uuid
|
||||
|
||||
from PyQt5.QtCore import pyqtProperty, pyqtSlot, pyqtSignal
|
||||
|
||||
from UM.Decorators import override
|
||||
|
@ -33,6 +35,7 @@ class GlobalStack(CuraContainerStack):
|
|||
super().__init__(container_id)
|
||||
|
||||
self.setMetaDataEntry("type", "machine") # For backward compatibility
|
||||
self.setMetaDataEntry("group_id", str(uuid.uuid4())) # Assign a new GlobalStack to a unique group by default
|
||||
|
||||
self._extruders = {} # type: Dict[str, "ExtruderStack"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue