[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [krita/eingerman/T3589-healbrush] plugins/tools/tool_smart_patch: Handle keyboard signals for brush
From: Eugene Ingerman <null () kde ! org>
Date: 2017-04-28 7:06:37
Message-ID: E1d3zzB-0004Ot-LS () code ! kde ! org
[Download RAW message or body]
Git commit ab0cf62a236f7fbe34752f56a3b0cdc8d95735c2 by Eugene Ingerman.
Committed on 28/04/2017 at 07:06.
Pushed by eingerman into branch 'eingerman/T3589-healbrush'.
Handle keyboard signals for brush size change for smart patch tool.
M +5 -4 plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
https://commits.kde.org/krita/ab0cf62a236f7fbe34752f56a3b0cdc8d95735c2
diff --git a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp \
b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp index \
dfc8114d3a7..128e34031db 100644
--- a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
+++ b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
@@ -167,7 +167,7 @@ void KisToolSmartPatch::addMaskPath( KoPointerEvent *event )
void KisToolSmartPatch::beginPrimaryAction(KoPointerEvent *event)
{
//we can only apply inpaint operation to paint layer
- if ( currentNode().isNull() || !currentNode()->inherits("KisPaintLayer")) {
+ if ( currentNode().isNull() || !currentNode()->inherits("KisPaintLayer") || \
nodePaintAbility()!=NodePaintAbility::PAINT ) { KisCanvas2 * kiscanvas = \
static_cast<KisCanvas2*>(canvas()); kiscanvas->viewManager()->
showFloatingMessage(
@@ -246,11 +246,12 @@ QPainterPath KisToolSmartPatch::getBrushOutlinePath(const \
QPointF &documentPos,
void KisToolSmartPatch::requestUpdateOutline(const QPointF &outlineDocPoint, const \
KoPointerEvent *event) {
- if( !event )
- return;
+ static QPointF lastDocPoint = QPointF(0,0);
+ if( event )
+ lastDocPoint=outlineDocPoint;
m_d->brushRadius = currentPaintOpPreset()->settings()->paintOpSize();
- m_d->brushOutline = getBrushOutlinePath(outlineDocPoint, event);
+ m_d->brushOutline = getBrushOutlinePath(lastDocPoint, event);
QRectF outlinePixelRect = m_d->brushOutline.boundingRect();
QRectF outlineDocRect = currentImage()->pixelToDocument(outlinePixelRect);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic