[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/commands Crop.cpp
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/commands Crop.cpp |
Date: |
Mon, 09 Mar 2009 21:30:44 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 09/03/09 21:30:44
Modified files:
src/commands : Crop.cpp
Log message:
* Set the Fade In/Out back for the resulting clips
* painting fixes
* make cancel_action() work
* fix clip positioning when clip track start pos != 0
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/Crop.cpp?cvsroot=traverso&r1=1.1&r2=1.2
Patches:
Index: Crop.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/Crop.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Crop.cpp 9 Mar 2009 19:45:32 -0000 1.1
+++ Crop.cpp 9 Mar 2009 21:30:44 -0000 1.2
@@ -23,6 +23,8 @@
#include "AudioClipView.h"
#include "ContextPointer.h"
+#include "Command.h"
+#include "Fade.h"
#include "SheetView.h"
#include "LineView.h"
#include "AudioClip.h"
@@ -54,6 +56,9 @@
m_selection = new QGraphicsRectItem(m_cv);
m_selection->setBrush(QColor(0, 0, 255, 100));
+ // Set the selection Z value to something sufficiently high
+ // to be _always_ on top of all the child views of m_cv
+ m_selection->setZValue(m_cv->zValue() + 20);
x2 = -1;
x1 = 32768;
}
@@ -69,21 +74,21 @@
leftClip->set_sheet(m_clip->get_sheet());
leftClip->set_track_start_location(m_clip->get_track_start_location());
- leftClip->set_right_edge(TimeRef(x1 *
m_cv->get_sheetview()->timeref_scalefactor));
-// if (leftClip->get_fade_out()) {
-// FadeRange* cmd = (FadeRange*)leftClip->reset_fade_out();
-// cmd->set_historable(false);
-// Command::process_command(cmd);
-// }
+ leftClip->set_right_edge(TimeRef(x1 *
m_cv->get_sheetview()->timeref_scalefactor) +
m_clip->get_track_start_location());
+ if (leftClip->get_fade_out()) {
+ FadeRange* cmd = (FadeRange*)leftClip->reset_fade_out();
+ cmd->set_historable(false);
+ Command::process_command(cmd);
+ }
rightClip->set_sheet(m_clip->get_sheet());
- rightClip->set_left_edge(TimeRef(x2 *
m_cv->get_sheetview()->timeref_scalefactor));
- rightClip->set_track_start_location(TimeRef(x1 *
m_cv->get_sheetview()->timeref_scalefactor));
-// if (rightClip->get_fade_in()) {
-// FadeRange* cmd = (FadeRange*)rightClip->reset_fade_in();
-// cmd->set_historable(false);
-// Command::process_command(cmd);
-// }
+ rightClip->set_left_edge(TimeRef(x2 *
m_cv->get_sheetview()->timeref_scalefactor) +
m_clip->get_track_start_location());
+
rightClip->set_track_start_location(leftClip->get_track_end_location());
+ if (rightClip->get_fade_in()) {
+ FadeRange* cmd = (FadeRange*)rightClip->reset_fade_in();
+ cmd->set_historable(false);
+ Command::process_command(cmd);
+ }
return 1;
}
@@ -95,6 +100,7 @@
int Crop::finish_hold()
{
+ delete m_selection;
return 1;
}
@@ -125,6 +131,7 @@
void Crop::cancel_action()
{
+ finish_hold();
}
- [Traverso-commit] traverso/src/commands Crop.cpp,
Remon Sijrier <=