mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Remove Profiles from Per Object Settings panel
Also disables Per Object Settings tool button when sidebar is in simple mode. Contributes to CURA-901
This commit is contained in:
parent
8eb6fecacf
commit
de28561152
3 changed files with 11 additions and 25 deletions
|
@ -5,6 +5,7 @@ from UM.Tool import Tool
|
|||
from UM.Scene.Selection import Selection
|
||||
from UM.Application import Application
|
||||
from UM.Qt.ListModel import ListModel
|
||||
from UM.Preferences import Preferences
|
||||
|
||||
from . import PerObjectSettingsModel
|
||||
|
||||
|
@ -15,6 +16,8 @@ class PerObjectSettingsTool(Tool):
|
|||
|
||||
self.setExposedProperties("Model", "SelectedIndex")
|
||||
|
||||
Preferences.getInstance().preferenceChanged.connect(self._onPreferenceChanged)
|
||||
|
||||
def event(self, event):
|
||||
return False
|
||||
|
||||
|
@ -35,4 +38,9 @@ class PerObjectSettingsTool(Tool):
|
|||
selected_object = None
|
||||
selected_object_id = id(selected_object)
|
||||
index = self.getModel().find("id", selected_object_id)
|
||||
return index
|
||||
return index
|
||||
|
||||
def _onPreferenceChanged(self, preference):
|
||||
if preference == "cura/active_mode":
|
||||
enabled = Preferences.getInstance().getValue(preference)==1
|
||||
Application.getInstance().getController().toolEnabledChanged.emit(self._plugin_id, enabled)
|
Loading…
Add table
Add a link
Reference in a new issue