mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Improved creation of source: selection of file generates a new source,
displayed in preview, and inserted when validated.
This commit is contained in:
13
Mixer.cpp
13
Mixer.cpp
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user