Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Make crop tool snap to the canvas when grow is disabled
Luna Lovecraftcdfa405aab00
diff --git a/plugins/tools/tool_crop/kis_tool_crop.cc b/plugins/tools/tool_crop/kis_tool_crop.ccindex 9bf8ecf13d..c03eb2d937 100644--- a/plugins/tools/tool_crop/kis_tool_crop.cc+++ b/plugins/tools/tool_crop/kis_tool_crop.cc@@ -662,6 +662,11 @@ void KisToolCrop::setAllowGrow(bool g)m_finalRect.setCropRect(image()->bounds());configGroup.writeEntry("allowGrow", g);+ // Do a dummy move for the crop area to snap back to the canvas if grow is no longer allowed+ if (!g) {+ m_finalRect.moveHandle(KisConstrainedRect::HandleType::Inside, QPoint(0, 0), m_finalRect.rect());+ }+Q_EMIT canGrowChanged(g);}