Cura
Cura copied to clipboard
4.20.13
I need to make a choice : use the @fieldOfView SideBar GUI Plugin or use the new function to display details of the current line in the layer view.
Without the Plugin installed
With the Plugin SideBar GUI V4.6.1
Hi @5axes , I know nothing about that plugin, perhaps @fieldofview can suggest a fix? Aldo, I anchor the (i) button to pathSlider.right.
Just been thinking, a workaround could be to edit SimulationViewMainComponent.qml which will be installed somewhere in the Cura 4.20.13 tree and change line 156 from:
left: pathSlider.right
to
right: playButton.left
And the vertical "layer" slider gets hidden by the SideBar GUI. That is no big thing as collapsing the Sidebar reveals the slider. The problem 5axes brought up is a pain.
Just been thinking, a workaround could be to edit SimulationViewMainComponent.qml which will be installed somewhere in the Cura 4.20.13 tree and change line 156 from:
left: pathSlider.right
to
right: playButton.left
That moves the (i) to the left of the slider...
Not a workaround Whitout the plugin :
With the plugin
Oh, I think we need help from @fieldOfView at this point because my knowledge of qml is like < 0.
TBH, ensuring Sidebar GUI keeps working with Ultimaker Cura releases is more than enough work for me. I'm not sure if I will be able to put time into this any time soon.
Hi @5axes , please try this instead, compared to the original file. As shown in the below diff, the line that starts "left:" is deleted and before the anchors section, a line that starts x: is added.
diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml
index 72382597a5..2f9aad231c 100644
--- a/plugins/SimulationView/SimulationViewMainComponent.qml
+++ b/plugins/SimulationView/SimulationViewMainComponent.qml
@@ -150,10 +150,10 @@ Item
color: UM.Theme.getColor("slider_handle")
iconMargin: UM.Theme.getSize("thick_lining").width
visible: !UM.SimulationView.compatibilityMode
+ x: playButton.x - playButton.width
anchors
{
- left: pathSlider.right
verticalCenter: pathSlider.verticalCenter
}
What I showed above works for me but isn't quite right. This version gives the same end result and is more correct:
diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml
index 72382597a5..273b0007bf 100644
--- a/plugins/SimulationView/SimulationViewMainComponent.qml
+++ b/plugins/SimulationView/SimulationViewMainComponent.qml
@@ -150,10 +150,10 @@ Item
color: UM.Theme.getColor("slider_handle")
iconMargin: UM.Theme.getSize("thick_lining").width
visible: !UM.SimulationView.compatibilityMode
+ x: playButton.x - UM.Theme.getSize("small_button").width
anchors
{
- left: pathSlider.right
verticalCenter: pathSlider.verticalCenter
}
Looks like really an issue due to the plugin and not easy to solved via your code.
x: playButton.x - UM.Theme.getSize("small_button").width
produce exatly the same result as left: pathSlider.right
The button is at the same place if the plugin is not activated but with the plugin :
Ok, thanks for trying it. Sorry, I don't have any other ideas right now.
Hi @5axes , here's another solution. The change below is applied to PathSlider.qml and it adds the line that starts Keys.onSpacePressed. With this in place, when the layer slider is focused, space will toggle the display of the line details. Hope this works for you.
diff --git a/plugins/SimulationView/PathSlider.qml b/plugins/SimulationView/PathSlider.qml
index 8d23c19d21..b35115e4ea 100644
--- a/plugins/SimulationView/PathSlider.qml
+++ b/plugins/SimulationView/PathSlider.qml
@@ -181,6 +181,8 @@ Item
Keys.onRightPressed: handle.setValueManually(handleValue + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
Keys.onLeftPressed: handle.setValueManually(handleValue - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
+ Keys.onSpacePressed: UM.SimulationView.setDisplayLineDetails(!UM.SimulationView.getDisplayLineDetails())
+
// dragging
MouseArea
No change
You need to remove the previous changes and just use the space bar toggle and ignore the hidden (i) button.