traverso-commit
[Top][All Lists]
Advanced

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

[Traverso-commit] traverso/src core/ViewPort.cpp sheetcanvas/Shee...


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src core/ViewPort.cpp sheetcanvas/Shee...
Date: Tue, 12 Feb 2008 17:31:49 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       08/02/12 17:31:49

Modified files:
        src/core       : ViewPort.cpp 
        src/sheetcanvas: SheetView.cpp 

Log message:
        * try to get rid of the 'jitter' of the hold cursor text item when the 
cursor is out of the viewports range
        * no longer need to call the current hold Command's jog() function when 
the scrollbar moves

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ViewPort.cpp?cvsroot=traverso&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/traverso/src/sheetcanvas/SheetView.cpp?cvsroot=traverso&r1=1.6&r2=1.7

Patches:
Index: core/ViewPort.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ViewPort.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- core/ViewPort.cpp   12 Feb 2008 15:09:36 -0000      1.32
+++ core/ViewPort.cpp   12 Feb 2008 17:31:49 -0000      1.33
@@ -281,6 +281,11 @@
 void ViewPort::set_holdcursor_text( const QString & text )
 {
        m_holdcursor->set_text(text);
+       // TODO Find out why we have to call set_holdcursor_pos() here 
+       // AGAIN when it allready has been called in for example MoveClip::jog()
+       // to AVOID jitter of the hold cursor text item when the cursor is 
+       // out of the viewports range
+       set_holdcursor_pos(mapToScene(cpointer().pos()).toPoint());
 }
 
 void ViewPort::set_holdcursor_pos(QPoint pos)
@@ -333,8 +338,6 @@
        }
        QString html = "<html><body bgcolor=ghostwhite>" + m_text + 
"</body></html>";
        m_textItem->setHtml(html);
-       
-       update();
 }
 
 void HoldCursor::set_type( const QString & type )

Index: sheetcanvas/SheetView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/sheetcanvas/SheetView.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- sheetcanvas/SheetView.cpp   7 Feb 2008 15:47:40 -0000       1.6
+++ sheetcanvas/SheetView.cpp   12 Feb 2008 17:31:49 -0000      1.7
@@ -276,18 +276,7 @@
        // This slot is called when the hscrollbar value changes,
        // which can be due shuttling or playhead scrolling the page.
        // In that very case, we do NOT set the hscrollbar value AGAIN
-       // but in case of a non-shuttle command, we call ie().jog to give the 
-       // command the opportunity to update (Gain-cursor position for example) 
-       // itself for the changed viewport / mouse coordinates.
-       // FIXME This is NOT a solution to set hold-cursors at the correct
-       // position in the viewport when it's scrolled programatically !!!!!
-       if (ie().is_holding()) {
-               Shuttle* s = dynamic_cast<Shuttle*>(ie().get_holding_command());
-               Zoom* z = dynamic_cast<Zoom*>(ie().get_holding_command());
-               if (!(s || z)) {
-                       ie().jog();
-               }
-       } else {
+       if (!ie().is_holding()) {
                m_clipsViewPort->horizontalScrollBar()->setValue(value);
        }
        




reply via email to

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