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

List:       kde-commits
Subject:    branches/koffice/1.6/koffice/krita/plugins/tools/tool_polygon
From:       Michael Thaler <michael.thaler () physik ! tu-muenchen ! de>
Date:       2006-03-26 13:17:21
Message-ID: 1143379041.160611.12871.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 522689 by mthaler:

The polygon tool can now be aborted by pressing ESC


 M  +10 -0     kis_tool_polygon.cc  
 M  +1 -0      kis_tool_polygon.h  


--- branches/koffice/1.6/koffice/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc #522688:522689
@@ -238,4 +238,14 @@
         }
 }
 
+void KisToolPolygon::keyPress(QKeyEvent *e)
+{
+    if (e->key()==Qt::Key_Escape);
+    // erase old lines on canvas
+    draw();
+    m_dragging = false;
+    m_points.clear();
+}
+
+
 #include "kis_tool_polygon.moc"
--- branches/koffice/1.6/koffice/krita/plugins/tools/tool_polygon/kis_tool_polygon.h #522688:522689
@@ -67,6 +67,7 @@
     void draw(KisCanvasPainter& gc);
     void draw();
     void finish();
+    virtual void keyPress(QKeyEvent *e);
 protected:
     KisPoint m_dragStart;
     KisPoint m_dragEnd;
[prev in list] [next in list] [prev in thread] [next in thread] 

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