[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_polyline
From:       Michael Thaler <michael.thaler () physik ! tu-muenchen ! de>
Date:       2006-03-26 13:14:34
Message-ID: 1143378874.192247.12152.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 522685 by mthaler:

Now the polyline tool can be aborted by pressing ESC


 M  +9 -0      kis_tool_polyline.cc  
 M  +1 -0      kis_tool_polyline.h  


--- branches/koffice/1.6/koffice/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc #522684:522685
@@ -258,4 +258,13 @@
     return i18n("Press shift-mouseclick to end the polyline.");
 }
 
+void KisToolPolyline::keyPress(QKeyEvent *e)
+{
+    if (e->key()==Qt::Key_Escape);
+    // erase old lines on canvas
+    draw();
+    m_dragging = false;
+    m_points.clear();
+}
+
 #include "kis_tool_polyline.moc"
--- branches/koffice/1.6/koffice/krita/plugins/tools/tool_polyline/kis_tool_polyline.h #522684:522685
@@ -63,6 +63,7 @@
     virtual void buttonRelease(KisButtonReleaseEvent *event);
     virtual QString quickHelp() const;
     void finish();
+    virtual void keyPress(QKeyEvent *e);
 
 public slots:
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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