[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [krita/wolthera/T5411-modernise-calligraphy-tool] plugins/tools/karbonplugins/tools/CalligraphyTool:
From:       Wolthera_van_Hövell_tot_Westerflier <null () kde ! org>
Date:       2017-03-25 15:11:54
Message-ID: E1crnMA-0002X3-1D () code ! kde ! org
[Download RAW message or body]

Git commit 6f02e2b033e693d1931e4dd6152f8d72f745bdfa by Wolthera van Hövell tot \
Westerflier. Committed on 25/03/2017 at 15:00.
Pushed by woltherav into branch 'wolthera/T5411-modernise-calligraphy-tool'.

Make the red outline only show up when using path snapping

M  +2    -1    plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp


https://commits.kde.org/krita/6f02e2b033e693d1931e4dd6152f8d72f745bdfa

diff --git a/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp \
b/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp index \
                5c11ede5717..8ce4ea9dc10 100644
--- a/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp
+++ b/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp
@@ -71,7 +71,7 @@ KarbonCalligraphyTool::~KarbonCalligraphyTool()
 
 void KarbonCalligraphyTool::paint(QPainter &painter, const KoViewConverter \
&converter)  {
-    if (m_selectedPath) {
+    if (m_selectedPath && m_usePath) {
         painter.save();
         painter.setRenderHints(QPainter::Antialiasing, false);
         painter.setPen(Qt::red);   // TODO make configurable
@@ -79,6 +79,7 @@ void KarbonCalligraphyTool::paint(QPainter &painter, const \
KoViewConverter &conv  QPointF p1 = converter.documentToView(rect.topLeft());
         QPointF p2 = converter.documentToView(rect.bottomRight());
         painter.drawRect(QRectF(p1, p2));
+        painter.drawPath(selected);
         painter.restore();
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic