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

List:       kde-commits
Subject:    koffice/krita/tools
From:       Melchior Franz <mfranz () kde ! org>
Date:       2005-04-16 20:02:59
Message-ID: 20050416200259.302483CA () office ! kde ! org
[Download RAW message or body]

CVS commit by mfranz: 

allow Alt-dragging to move line


  M +7 -2      kis_tool_line.cc   1.50


--- koffice/krita/tools/kis_tool_line.cc  #1.49:1.50
@@ -99,7 +99,12 @@ void KisToolLine::move(KisMoveEvent *e)
                 //KisCanvasControllerInterface *controller = m_subject -> canvasController();
 
-                if ((e -> state() & Qt::ShiftButton) == Qt::ShiftButton) {
+                if (e -> state() & Qt::AltButton) {
+                        KisPoint trans = e -> pos() - m_endPos;
+                        m_startPos += trans;
+                        m_endPos += trans;
+                } else if (e -> state() & Qt::ShiftButton)
                         m_endPos = straightLine(e -> pos());
-                } else m_endPos = e -> pos();//controller -> windowToView(e -> pos());
+                else
+                        m_endPos = e -> pos();//controller -> windowToView(e -> pos());
                 paintLine();
         }


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

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