traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src/traverso/songcanvas CurveView.cpp


From: Ben Levitt
Subject: [Traverso-commit] traverso/src/traverso/songcanvas CurveView.cpp
Date: Sat, 21 Apr 2007 01:07:04 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Ben Levitt <benjie>     07/04/21 01:07:04

Modified files:
        src/traverso/songcanvas: CurveView.cpp 

Log message:
        Allow undoing CurveNode drags, drag from on_first_input_event_x/y()

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/CurveView.cpp?cvsroot=traverso&r1=1.33&r2=1.34

Patches:
Index: CurveView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/CurveView.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- CurveView.cpp       20 Apr 2007 13:22:21 -0000      1.33
+++ CurveView.cpp       21 Apr 2007 01:07:04 -0000      1.34
@@ -79,14 +79,7 @@
 
 int DragNode::prepare_actions()
 {
-       // CurveView node_moved() depends on blinking node
-       // to update the curveview, but during un/redo
-       // this makes no sense!!!!!!!
-       // So we fake this action to be failed, and thus
-       // it won't show up in the history 
-
-       // TODO: Fix this so DragNode commands can be undoable
-       return -1;
+       return 1;
 }
 
 int DragNode::finish_hold()
@@ -105,7 +98,7 @@
        m_origPos.setY(m_node->get_value());
        m_newPos = m_origPos;
        
-       m_mousepos = cpointer().pos();
+       m_mousepos = QPoint(cpointer().on_first_input_event_x(), 
cpointer().on_first_input_event_y());
        return 1;
 }
 
@@ -477,6 +470,11 @@
 
 void CurveView::node_moved( )
 {
+       if (!m_blinkingNode) {
+               update();
+               return;
+       }
+
        CurveNodeView* prev = 0;
        CurveNodeView* next = 0;
        




reply via email to

[Prev in Thread] Current Thread [Next in Thread]