@@ -17,7 +17,6 @@ class SidebarGUIPlugin(Extension):
1717
1818 def __init__ (self ):
1919 super ().__init__ ()
20-
2120 self ._prepare_stage_view_id = "SolidView" # can be "SolidView" or "XRayView"
2221
2322 Application .getInstance ().pluginsLoaded .connect (self ._onPluginsLoaded )
@@ -58,6 +57,12 @@ def _onEngineCreated(self):
5857 preview_stage .addDisplayComponent ("menu" , sidebar_component_path )
5958 preview_stage .addDisplayComponent ("main" , main_component_path )
6059
60+ # SmartSlicePlugin stage is provided by the SmartSlicePlugin plugin
61+ if "SmartSlicePlugin" in self ._controller .getAllStages ():
62+ smartslice_stage = self ._controller .getStage ("SmartSlicePlugin" )
63+ smartslice_stage .addDisplayComponent ("menu" , sidebar_component_path )
64+ smartslice_stage .addDisplayComponent ("main" , main_component_path )
65+
6166 monitor_stage = self ._controller .getStage ("MonitorStage" )
6267 monitor_stage .addDisplayComponent ("menu" , monitor_menu_component_path )
6368
@@ -79,13 +84,15 @@ def _onViewChanged(self):
7984 active_stage_id = self ._controller .getActiveStage ().getPluginId ()
8085 active_view_id = self ._controller .getActiveView ().getPluginId ()
8186
87+ if active_stage_id == "SmartSlicePlugin" : # SmartSlicePlugin view is provided by the SmartSlicePlugin plugin
88+ return
89+
8290 if active_stage_id == "PrepareStage" :
8391 if active_view_id not in ["SolidView" , "XRayView" ]:
8492 self ._controller .setActiveView ("SolidView" )
8593 return
8694 self ._prepare_stage_view_id = active_view_id
87-
88- if active_stage_id == "MonitorStage" :
95+ elif active_stage_id == "MonitorStage" :
8996 return
9097
9198 if active_view_id in ["SimulationView" , "FastView" ]: # FastView is provided by the RAWMouse plugin
0 commit comments