Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 119e8d27 authored by Scott Petrovic's avatar Scott Petrovic

Add apply and reset options to context menu for transform tool

parent 4faeb8ce
......@@ -133,14 +133,10 @@ KisToolTransform::KisToolTransform(KoCanvasBase * canvas)
rotateNinteyCWAction = new KisAction(i18n("Rotate 90 degrees Clockwise"));
rotateNinteyCCWAction = new KisAction(i18n("Rotate 90 degrees CounterClockwise"));
m_contextMenu.reset(new QMenu());
connect(warpAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToWarpType()));
connect(perspectiveAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToPerspectiveType()));
connect(freeTransformAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToFreeTransformType()));
connect(liquifyAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToLiquifyType()));
connect(cageAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToCageType()));
applyTransformation = new KisAction(i18n("Apply"));
resetTransformation = new KisAction(i18n("Reset"));
m_contextMenu.reset(new QMenu());
connect(m_warpStrategy.data(), SIGNAL(requestCanvasUpdate()), SLOT(canvasUpdateRequested()));
connect(m_cageStrategy.data(), SIGNAL(requestCanvasUpdate()), SLOT(canvasUpdateRequested()));
......@@ -366,7 +362,9 @@ QMenu* KisToolTransform::popupActionsMenu()
m_contextMenu->addAction(rotateNinteyCCWAction);
}
m_contextMenu->addSeparator();
m_contextMenu->addAction(applyTransformation);
m_contextMenu->addAction(resetTransformation);
}
return m_contextMenu.data();
......@@ -1094,6 +1092,16 @@ QWidget* KisToolTransform::createOptionWidget() {
connect(rotateNinteyCCWAction, SIGNAL(triggered(bool)), m_optionsWidget, SLOT(slotRotateCCW()));
connect(warpAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToWarpType()));
connect(perspectiveAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToPerspectiveType()));
connect(freeTransformAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToFreeTransformType()));
connect(liquifyAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToLiquifyType()));
connect(cageAction, SIGNAL(triggered(bool)), this, SLOT(slotUpdateToCageType()));
connect(applyTransformation, SIGNAL(triggered(bool)), this, SLOT(slotApplyTransform()));
connect(resetTransformation, SIGNAL(triggered(bool)), this, SLOT(slotResetTransform()));
updateOptionWidget();
return m_optionsWidget;
......
......@@ -304,6 +304,8 @@ private:
KisAction* cageAction;
KisAction* freeTransformAction;
KisAction* perspectiveAction;
KisAction* applyTransformation;
KisAction* resetTransformation;
// a few extra context click options if free transform is active
KisAction* mirrorHorizontalAction;
......@@ -313,6 +315,7 @@ private:
/**
* This artificial rect is used to store the image to flake
* transformation. We check against this rect to get to know
......
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