Commit 7167c6be authored by Wolthera van Hövell's avatar Wolthera van Hövell 🐛

Add canvas rotation action and add it to view menu.

A bit minor of a change, but it's a frequently asked thing, and I think
this one just got lost in the MDI update.
parent d592d520
......@@ -70,6 +70,7 @@ xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0 http://www.kde.org
<Action name="zoom_to_100pct" />
<Action name="rotate_canvas_right" />
<Action name="rotate_canvas_left" />
<Action name="reset_canvas_rotation" />
<!-- TODO: Something is not right with the way zoom actions are hooked up. These are in the KoZoomController.
It seems they are not being properly placed in the view manager since the MDI changes were implemented
-->
......
......@@ -605,6 +605,19 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="reset_canvas_rotation">
<icon></icon>
<text>Reset Canvas Rotation</text>
<whatsThis></whatsThis>
<toolTip>Rotate Canvas Left</toolTip>
<iconText>Rotate Canvas Left</iconText>
<activationFlags>1</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<defaultShortcut></defaultShortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="view_ruler">
<icon></icon>
<text>Show &amp;Rulers</text>
......
......@@ -156,6 +156,7 @@ public:
, openResourcesDirectory(0)
, rotateCanvasRight(0)
, rotateCanvasLeft(0)
, resetCanvasRotation(0)
, wrapAroundAction(0)
, levelOfDetailAction(0)
, showRulersAction(0)
......@@ -194,6 +195,7 @@ public:
KisAction *openResourcesDirectory;
KisAction *rotateCanvasRight;
KisAction *rotateCanvasLeft;
KisAction *resetCanvasRotation;
KisAction *wrapAroundAction;
KisAction *levelOfDetailAction;
KisAction *showRulersAction;
......@@ -343,6 +345,7 @@ void KisViewManager::setCurrentView(KisView *view)
d->viewConnections.addUniqueConnection(&d->nodeManager, SIGNAL(sigNodeActivated(KisNodeSP)), doc->image(), SLOT(requestStrokeEndActiveNode()));
d->viewConnections.addUniqueConnection(d->rotateCanvasRight, SIGNAL(triggered()), canvasController, SLOT(rotateCanvasRight15()));
d->viewConnections.addUniqueConnection(d->rotateCanvasLeft, SIGNAL(triggered()),canvasController, SLOT(rotateCanvasLeft15()));
d->viewConnections.addUniqueConnection(d->resetCanvasRotation, SIGNAL(triggered()),canvasController, SLOT(resetCanvasRotation()));
d->viewConnections.addUniqueConnection(d->wrapAroundAction, SIGNAL(toggled(bool)), canvasController, SLOT(slotToggleWrapAroundMode(bool)));
d->wrapAroundAction->setChecked(canvasController->wrapAroundMode());
......@@ -588,6 +591,7 @@ void KisViewManager::createActions()
d->rotateCanvasRight = actionManager()->createAction("rotate_canvas_right");
d->rotateCanvasLeft = actionManager()->createAction("rotate_canvas_left");
d->resetCanvasRotation = actionManager()->createAction("reset_canvas_rotation");
d->wrapAroundAction = actionManager()->createAction("wrap_around_mode");
d->levelOfDetailAction = actionManager()->createAction("level_of_detail_mode");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment