Skip to content

Commit 224416f

Browse files
committed
Fix interop with FastView (part of the RawMouse package)
Fixes #21
1 parent 3b62874 commit 224416f

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

SidebarGUIPlugin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,15 @@ def _onViewChanged(self):
8080
active_view_id = self._controller.getActiveView().getPluginId()
8181

8282
if active_stage_id == "PrepareStage":
83+
if active_view_id not in ["SolidView", "XRayView"]:
84+
self._controller.setActiveView("SolidView")
85+
return
8386
self._prepare_stage_view_id = active_view_id
8487

8588
if active_stage_id == "MonitorStage":
8689
return
8790

88-
if active_view_id == "SimulationView":
91+
if active_view_id in ["SimulationView", "FastView"]: # FastView is provided by the RAWMouse plugin
8992
if active_stage_id != "PreviewStage":
9093
self._controller.setActiveStage("PreviewStage")
9194
else:

resources/qml/PrepareStageLegend.qml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Cura.ExpandableComponent
3939
onActiveViewChanged:
4040
{
4141
xrayViewCheckBox.checked = (activeView == "XRayView")
42+
xrayViewCheckBox.visible = (activeView != "FastView")
43+
fastViewLabel.visible = (activeView == "FastView")
4244
}
4345

4446
property string activeView:
@@ -67,6 +69,18 @@ Cura.ExpandableComponent
6769
width: parent.width
6870
}
6971

72+
Label
73+
{
74+
id: fastViewLabel
75+
text: catalog.i18nc("@label", "Fast View")
76+
77+
height: UM.Theme.getSize("layerview_row").height
78+
width: parent.width
79+
color: UM.Theme.getColor("setting_control_text")
80+
font: UM.Theme.getFont("default")
81+
renderType: Text.NativeRendering
82+
}
83+
7084
Item
7185
{
7286
// mock item to compensate for compatibility mode label in simulation view

0 commit comments

Comments
 (0)