[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso resources/keymap.xml src/commands/Play...
From: |
Ben Levitt |
Subject: |
[Traverso-commit] traverso resources/keymap.xml src/commands/Play... |
Date: |
Thu, 27 Dec 2007 01:58:46 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Ben Levitt <benjie> 07/12/27 01:58:46
Modified files:
resources : keymap.xml
src/commands : PlayHeadMove.cpp
src/traverso/songcanvas: Cursors.cpp
Log message:
- Fix SHIFT/MiddleMouseButton on a marker when holding for too long (on
a drag, perform a
playhead_to_marker instead of touch_play_cursor)
- Lower the auto-scroll margin from 15% to 5%, and make it easier to
configure in the code
(add a #define)
- Fix a bug in drag playhead that would leave the playhead unset when
the begin_hold and
finish_hold had no jog events in between.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/keymap.xml?cvsroot=traverso&r1=1.91&r2=1.92
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/PlayHeadMove.cpp?cvsroot=traverso&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/Cursors.cpp?cvsroot=traverso&r1=1.34&r2=1.35
Patches:
Index: resources/keymap.xml
===================================================================
RCS file: /sources/traverso/traverso/resources/keymap.xml,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- resources/keymap.xml 27 Nov 2007 20:20:41 -0000 1.91
+++ resources/keymap.xml 27 Dec 2007 01:58:46 -0000 1.92
@@ -371,6 +371,7 @@
<keyfact type="HKEY" key1="MouseButtonMiddle" >
<Objects>
<Object objectname="SongView" mousehint="LR"
slotsignature="play_cursor_move" modes="All" sortorder="9" submenu="Playhead" />
+ <Object objectname="TimeLineView"
slotsignature="playhead_to_marker" modes="All" sortorder="2" />
</Objects>
</keyfact>
<keyfact type="HKEY" key1="W" >
@@ -404,6 +405,7 @@
<keyfact type="HKEY" key1="SHIFT" >
<Objects>
<Object objectname="SongView" mousehint="LR"
slotsignature="play_cursor_move" modes="All" sortorder="8" submenu="Playhead" />
+ <Object objectname="TimeLineView"
slotsignature="playhead_to_marker" modes="All" sortorder="2" />
</Objects>
</keyfact>
<keyfact type="HKEY" key1="F" >
Index: src/commands/PlayHeadMove.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/PlayHeadMove.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/commands/PlayHeadMove.cpp 28 Sep 2007 18:33:43 -0000 1.15
+++ src/commands/PlayHeadMove.cpp 27 Dec 2007 01:58:46 -0000 1.16
@@ -64,6 +64,7 @@
m_cursor->set_active(false);
m_origXPos = m_newXPos = int(m_song->get_transport_location() /
m_sv->timeref_scalefactor);
m_sv->start_shuttle(true, true);
+ jog();
return 1;
}
Index: src/traverso/songcanvas/Cursors.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/Cursors.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- src/traverso/songcanvas/Cursors.cpp 3 Dec 2007 20:45:14 -0000 1.34
+++ src/traverso/songcanvas/Cursors.cpp 27 Dec 2007 01:58:46 -0000 1.35
@@ -34,6 +34,8 @@
#include "Debugger.h"
#define ANIME_DURATION 1000
+#define AUTO_SCROLL_MARGIN 0.05 // autoscroll when within 5% of the clip
view port
+
PlayHead::PlayHead(SongView* sv, Song* song, ClipsViewPort* vp)
: ViewItem(0, song)
@@ -163,14 +165,14 @@
// If the playhead is _not_ in the viewports range, center it
in the middle!
m_sv->set_hscrollbar_value((int)scenePos().x() - (int)(0.5 *
vpWidth));
- } else if (vppoint.x() > ( vpWidth * 0.85) ) {
+ } else if (vppoint.x() > ( vpWidth * (1.0 - AUTO_SCROLL_MARGIN) )) {
// If the playhead is in the viewports range, and is nearing
the end
// either start the animated flip page, or flip the page and
place the
// playhead cursor ~ 1/10 from the left viewport border
if (m_mode == ANIMATED_FLIP_PAGE) {
if (m_animation.state() != QTimeLine::Running) {
- m_animFrameRange = (int)(vpWidth * 0.7);
+ m_animFrameRange = (int)(vpWidth * (1.0 -
(AUTO_SCROLL_MARGIN * 2)));
m_totalAnimValue = 0;
m_animation.setFrameRange(0, m_animFrameRange);
calculate_total_anim_frames();
@@ -181,7 +183,7 @@
m_animation.start();
}
} else {
- m_sv->set_hscrollbar_value((int) ((int)scenePos().x() -
(0.1 * vpWidth)) );
+ m_sv->set_hscrollbar_value((int) ((int)scenePos().x() -
(AUTO_SCROLL_MARGIN * vpWidth)) );
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso resources/keymap.xml src/commands/Play...,
Ben Levitt <=