mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
ViewOrientationControls now use actions
This prevents code duplication CURA-5395
This commit is contained in:
parent
0bc8a67a37
commit
8b7c95da35
2 changed files with 34 additions and 34 deletions
|
|
@ -6,7 +6,7 @@ import QtQuick.Controls 1.1
|
|||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
import UM 1.4 as UM
|
||||
|
||||
import Cura 1.1 as Cura
|
||||
// A row of buttons that control the view direction
|
||||
Row
|
||||
{
|
||||
|
|
@ -19,30 +19,30 @@ Row
|
|||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_3d")
|
||||
onClicked: UM.Controller.rotateView("3d", 0)
|
||||
onClicked: Cura.Actions.view3DCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_front")
|
||||
onClicked: UM.Controller.rotateView("home", 0)
|
||||
onClicked: Cura.Actions.viewFrontCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_top")
|
||||
onClicked: UM.Controller.rotateView("y", 90)
|
||||
onClicked: Cura.Actions.viewTopCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_left")
|
||||
onClicked: UM.Controller.rotateView("x", 90)
|
||||
onClicked: Cura.Actions.viewLeftSideCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_right")
|
||||
onClicked: UM.Controller.rotateView("x", -90)
|
||||
onClicked: Cura.Actions.viewRightSideCamera.trigger()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue