Summary: | Clicking and dragging outside the direct canvas should still initiate an action | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Thomas Zander <zander> |
Component: | General | Assignee: | Halla Rempt <halla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Thomas Zander
2006-07-08 23:14:33 UTC
SVN commit 575636 by coppens: Due to popular request: allow freehand painting strokes to start outside the image area. This would be especially handy together with wishlist item 132759 CCBUG:130481 CCBUG:132759 M +4 -2 kis_tool_freehand.cc --- branches/koffice/1.6/koffice/krita/ui/kis_tool_freehand.cc #575635:575636 @@ -81,9 +81,11 @@ if (e->button() == QMouseEvent::LeftButton) { + // People complain that they can't start brush strokes outside of the image boundaries. + // This makes sense, especially when combined with BUG:132759, so commenting out the + // next line makes sense. + //if (!m_currentImage->bounds().contains(e->pos().floorQPoint())) return; - if (!m_currentImage->bounds().contains(e->pos().floorQPoint())) return; - initPaint(e); paintAt(e->pos(), e->pressure(), e->xTilt(), e->yTilt()); SVN commit 601444 by rempt: Fix crop tool so clicking outside the image area works CCBUG: 130481 M +24 -15 kis_tool_crop.cc --- branches/koffice/1.6/koffice/krita/plugins/tools/tool_crop/kis_tool_crop.cc #601443:601444 @@ -147,25 +147,34 @@ if (img && img->activeDevice() && e->button() == LeftButton) { - if (img->bounds().contains(e->pos().floorQPoint())) { + QPoint pos = e->pos().floorQPoint(); + QRect b = img->bounds(); - m_selecting = true; + if (pos.x() < b.x()) + pos.setX(b.x()); + else if (pos.x() > b.x() + b.width()) + pos.setX(b.x() + b.width()); - if( !m_haveCropSelection ) //if the selection is not set - { - QPoint p = e->pos().floorQPoint(); - m_rectCrop = QRect( p.x(), p.y(), 0, 0); - paintOutlineWithHandles(); - } - else - { - KisCanvasController *controller = m_subject->canvasController(); - m_mouseOnHandleType = mouseOnHandle(controller ->windowToView(e->pos().floorQPoint())); - m_dragStart = e->pos().floorQPoint(); - } + if (pos.y() < b.y()) + pos.setY(b.y()); + else if (pos.y() > b.y() + b.height()) + pos.setY(b.y() + b.height()); + + m_selecting = true; - updateWidgetValues(); + if( !m_haveCropSelection ) //if the selection is not set + { + m_rectCrop = QRect( pos.x(), pos.y(), 0, 0); + paintOutlineWithHandles(); } + else + { + KisCanvasController *controller = m_subject->canvasController(); + m_mouseOnHandleType = mouseOnHandle(controller ->windowToView(pos)); + m_dragStart = pos; + } + + updateWidgetValues(); } } } Checked all tools, fixed the crop tool. Forward ported to trunk. |