Improved creation of source: selection of file generates a new source,

displayed in preview, and inserted when validated.
This commit is contained in:
brunoherbelin
2020-05-23 19:13:05 +02:00
parent 2cc45edfbd
commit 614fa1247d
9 changed files with 146 additions and 76 deletions

View File

@@ -258,7 +258,10 @@ void Mixer::insertSource(Source *s)
geometry_.scene.ws()->attach(s->group(View::GEOMETRY));
layer_.scene.ws()->attach(s->group(View::LAYER));
// set a default depth to the new source
layer_.setDepth(s);
current_view_->update(0);
}
}
@@ -357,6 +360,16 @@ void Mixer::unsetCurrentSource()
current_source_index_ = -1;
}
void Mixer::cloneCurrentSource()
{
if ( current_source_ != session_->end() )
{
Source *s = createSourceClone( (*current_source_)->name() );
insertSource(s);
}
}
int Mixer::indexCurrentSource()
{
return current_source_index_;