traverso-commit
[Top][All Lists]
Advanced

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

[Traverso-commit] traverso resources/keymap.xml src/commands/Move...


From: Remon Sijrier
Subject: [Traverso-commit] traverso resources/keymap.xml src/commands/Move...
Date: Sat, 16 Feb 2008 21:54:44 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       08/02/16 21:54:44

Modified files:
        resources      : keymap.xml 
        src/commands   : MoveClip.cpp 
        src/core       : AudioClipManager.cpp AudioClipManager.h 
                         SnapList.cpp 

Log message:
        * re-active AudioClip selection. When a clip is selected, MoveClip will 
now move the whole selection.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/keymap.xml?cvsroot=traverso&r1=1.105&r2=1.106
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/MoveClip.cpp?cvsroot=traverso&r1=1.70&r2=1.71
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClipManager.cpp?cvsroot=traverso&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClipManager.h?cvsroot=traverso&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/SnapList.cpp?cvsroot=traverso&r1=1.28&r2=1.29

Patches:
Index: resources/keymap.xml
===================================================================
RCS file: /sources/traverso/traverso/resources/keymap.xml,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- resources/keymap.xml        13 Feb 2008 23:20:58 -0000      1.105
+++ resources/keymap.xml        16 Feb 2008 21:54:44 -0000      1.106
@@ -107,6 +107,7 @@
                </keyfact>
                <keyfact type="FKEY" key1="S" >
                        <Objects>
+                               <Object objectname="AudioClip" modes="All" 
sortorder="1" submenu="Selection" pluginname="TraversoCommands" 
commandname="ClipSelectionSelect" arguments="select_clip" />
                                <Object objectname="Project" 
slotsignature="select" modes="All" />
                                <Object objectname="MoveClip" 
slotsignature="prev_snap_pos" modes="All" sortorder="1" />
                                <Object objectname="DragMarker" 
slotsignature="move_left" modes="All" sortorder="1" />
@@ -262,15 +263,19 @@
                </keyfact>
                
                
-               
-               <keyfact type="FKEY2" key1="A" key2="B" >
+               <keyfact type="FKEY2" key1="A" key2="S" >
                        <Objects>
-                               <Object objectname="Interface" 
slotsignature="about_traverso" modes="All" />
+                               <Object objectname="AudioClip" modes="All" 
sortorder="2" submenu="Selection" pluginname="TraversoCommands" 
commandname="ClipSelectionAdd" arguments="add_to_selection" />
+                       </Objects>
+               </keyfact>
+               <keyfact type="FKEY2" key1="D" key2="S" >
+                       <Objects>
+                               <Object objectname="AudioClip" modes="All" 
sortorder="3" submenu="Selection" pluginname="TraversoCommands" 
commandname="ClipSelectionRemove" arguments="remove_from_selection" />
                        </Objects>
                </keyfact>
-               <keyfact type="FKEY2" key1="CTRL" key2="S" >
+               <keyfact type="FKEY2" key1="A" key2="B" >
                        <Objects>
-                               <Object objectname="ProjectManager" 
slotsignature="save_project" modes="All" />
+                               <Object objectname="Interface" 
slotsignature="about_traverso" modes="All" />
                        </Objects>
                </keyfact>
                <keyfact type="FKEY2" key1="S" key2="N" >

Index: src/commands/MoveClip.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/MoveClip.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -b -r1.70 -r1.71
--- src/commands/MoveClip.cpp   16 Feb 2008 20:04:42 -0000      1.70
+++ src/commands/MoveClip.cpp   16 Feb 2008 21:54:44 -0000      1.71
@@ -22,6 +22,7 @@
 #include "MoveClip.h"
 
 #include "AudioClip.h"
+#include "AudioClipManager.h"
 #include "ContextPointer.h"
 #include "InputEngine.h"
 #include "SnapList.h"
@@ -126,8 +127,15 @@
                AudioClipView* cv = qobject_cast<AudioClipView*>(view);
                Q_ASSERT(cv);
                d->sv = cv->get_sheetview();
-               m_group.add_clip(cv->get_clip());
-               d->pointedTrackIndex = 
cv->get_clip()->get_track()->get_sort_index();
+               AudioClip* clip  = cv->get_clip();
+               if (clip->is_selected()) {
+                       QList<AudioClip*> selected;
+                       
clip->get_sheet()->get_audioclip_manager()->get_selected_clips_state(selected);
+                       m_group.set_clips(selected);
+               } else {
+                       m_group.add_clip(clip);
+               }
+               d->pointedTrackIndex = clip->get_track()->get_sort_index();
        }
        
        m_origTrackIndex = m_newTrackIndex = m_group.get_track_index();

Index: src/core/AudioClipManager.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClipManager.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/core/AudioClipManager.cpp       21 Jan 2008 16:22:13 -0000      1.21
+++ src/core/AudioClipManager.cpp       16 Feb 2008 21:54:44 -0000      1.22
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
-    $Id: AudioClipManager.cpp,v 1.21 2008/01/21 16:22:13 r_sijrier Exp $
+    $Id: AudioClipManager.cpp,v 1.22 2008/02/16 21:54:44 r_sijrier Exp $
 */
  
 #include "AudioClipManager.h"
@@ -167,9 +167,9 @@
        
 }
 
-QList<AudioClip* >* AudioClipManager::get_clip_list()
+QList<AudioClip* > AudioClipManager::get_clip_list() const
 {
-       return &m_clips;
+       return m_clips;
 }
 
 /****************************** SLOTS ***************************/

Index: src/core/AudioClipManager.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClipManager.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- src/core/AudioClipManager.h 21 Jan 2008 16:22:13 -0000      1.8
+++ src/core/AudioClipManager.h 16 Feb 2008 21:54:44 -0000      1.9
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: AudioClipManager.h,v 1.8 2008/01/21 16:22:13 r_sijrier Exp $
+$Id: AudioClipManager.h,v 1.9 2008/02/16 21:54:44 r_sijrier Exp $
 */
 
 #ifndef AUDIOCLIPMANAGER_H
@@ -46,7 +46,7 @@
        void get_selected_clips_state(QList<AudioClip*> & list);
        void set_selected_clips_state(QList<AudioClip*> & list);
 
-       QList<AudioClip* >* get_clip_list();
+       QList<AudioClip* > get_clip_list() const;
 
        const TimeRef& get_last_location() const;
 

Index: src/core/SnapList.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/SnapList.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- src/core/SnapList.cpp       13 Feb 2008 15:28:52 -0000      1.28
+++ src/core/SnapList.cpp       16 Feb 2008 21:54:44 -0000      1.29
@@ -66,18 +66,18 @@
        m_xposBool.clear();
        
        // collects all clip boundaries and adds them to the snap list
-       QList<AudioClip* >* acList = 
m_sheet->get_audioclip_manager()->get_clip_list();
+       QList<AudioClip* > acList = 
m_sheet->get_audioclip_manager()->get_clip_list();
        
-       SLPRINT("acList size is %d\n", acList->size());
+       SLPRINT("acList size is %d\n", acList.size());
 
        // Be able to snap to trackstart
        if (m_rangeStart == qint64(0)) {
                m_xposList.append(TimeRef());
        }
 
-       for( int i = 0; i < acList->size(); i++ ) {
+       for( int i = 0; i < acList.size(); i++ ) {
 
-               AudioClip* clip = acList->at(i);
+               AudioClip* clip = acList.at(i);
                if ( ! clip->is_snappable()) {
                        continue;
                }




reply via email to

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