made timeline in/out toggleable
This commit is contained in:
+2
-1
@@ -944,7 +944,8 @@ void Project::save_folder(QXmlStreamWriter& stream, int type, bool set_ids_only,
|
||||
if (s == sequence) {
|
||||
stream.writeAttribute("open", "1");
|
||||
}
|
||||
stream.writeAttribute("workarea", QString::number(s->using_workarea));
|
||||
stream.writeAttribute("workarea", QString::number(s->using_workarea));
|
||||
stream.writeAttribute("workareaEnabled", QString::number(s->enable_workarea));
|
||||
stream.writeAttribute("workareaIn", QString::number(s->workarea_in));
|
||||
stream.writeAttribute("workareaOut", QString::number(s->workarea_out));
|
||||
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
g.out = entry_point + sequence_length - default_clip_in;
|
||||
|
||||
if (s->using_workarea) {
|
||||
if (s->using_workarea && s->enable_workarea) {
|
||||
g.out -= (sequence_length - default_clip_out);
|
||||
}
|
||||
|
||||
|
||||
+12
-5
@@ -257,7 +257,7 @@ void Viewer::go_to_end() {
|
||||
|
||||
void Viewer::go_to_in() {
|
||||
if (seq != NULL) {
|
||||
if (seq->using_workarea) {
|
||||
if (seq->using_workarea && seq->enable_workarea) {
|
||||
seek(seq->workarea_in);
|
||||
} else {
|
||||
go_to_start();
|
||||
@@ -275,7 +275,7 @@ void Viewer::next_frame() {
|
||||
|
||||
void Viewer::go_to_out() {
|
||||
if (seq != NULL) {
|
||||
if (seq->using_workarea) {
|
||||
if (seq->using_workarea && seq->enable_workarea) {
|
||||
seek(seq->workarea_out);
|
||||
} else {
|
||||
go_to_end();
|
||||
@@ -449,7 +449,14 @@ void Viewer::clear_inout_point() {
|
||||
if (seq->using_workarea) {
|
||||
undo_stack.push(new SetTimelineInOutCommand(seq, false, 0, 0));
|
||||
update_parents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Viewer::toggle_enable_inout() {
|
||||
if (seq != NULL && seq->using_workarea) {
|
||||
undo_stack.push(new SetBool(&seq->enable_workarea, !seq->enable_workarea));
|
||||
update_parents();
|
||||
}
|
||||
}
|
||||
|
||||
void Viewer::set_in_point() {
|
||||
@@ -484,13 +491,13 @@ void Viewer::set_sb_max() {
|
||||
}
|
||||
|
||||
long Viewer::get_seq_in() {
|
||||
return (seq->using_workarea)
|
||||
return (seq->using_workarea && seq->enable_workarea)
|
||||
? seq->workarea_in
|
||||
: 0;
|
||||
}
|
||||
|
||||
long Viewer::get_seq_out() {
|
||||
return (seq->using_workarea && previous_playhead < seq->workarea_out)
|
||||
return (seq->using_workarea && seq->enable_workarea && previous_playhead < seq->workarea_out)
|
||||
? seq->workarea_out
|
||||
: seq->getEndFrame();
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ public:
|
||||
void clear_in();
|
||||
void clear_out();
|
||||
void clear_inout_point();
|
||||
void toggle_enable_inout();
|
||||
void set_in_point();
|
||||
void set_out_point();
|
||||
void set_zoom(bool in);
|
||||
|
||||
Reference in New Issue
Block a user