mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Grouped objects now correctly get per-object settings
Instead of the first object, the group gets the settings.
This commit is contained in:
parent
64977426df
commit
ee1c16d1fc
@ -27,6 +27,12 @@ class PerObjectSettingsTool(Tool):
|
||||
return PerObjectSettingsModel.PerObjectSettingsModel(self._model)
|
||||
|
||||
def getSelectedIndex(self):
|
||||
selected_object_id = id(Selection.getSelectedObject(0))
|
||||
try:
|
||||
selected_object = Selection.getSelectedObject(0)
|
||||
if selected_object.getParent().callDecoration("isGroup"):
|
||||
selected_object = selected_object.getParent()
|
||||
except:
|
||||
selected_object = None
|
||||
selected_object_id = id(selected_object)
|
||||
index = self.getModel().find("id", selected_object_id)
|
||||
return index
|
Loading…
x
Reference in New Issue
Block a user