Bugfix: update depth of sources from dropped media file

To be investigated further if problem persists: patch seems to work (increment twice View::need_deep_update_) but not fully sure why two frames are necessary...
This commit is contained in:
Bruno Herbelin
2022-02-22 23:32:43 +01:00
parent 559a186cd9
commit c355bd7569
2 changed files with 3 additions and 3 deletions

View File

@@ -118,8 +118,8 @@ void MediaSource::init()
// force update of activation mode
active_ = true;
// deep update to reorder
++View::need_deep_update_;
// deep update to reorder (two frames to give time to insert)
View::need_deep_update_ += 2;
// done init
Log::Info("Source '%s' linked to Media %s.", name().c_str(), std::to_string(mediaplayer_->id()).c_str());

View File

@@ -453,7 +453,7 @@ void Mixer::insertSource(Source *s, View::Mode m)
// switch to this view to show source created
setView(m);
current_view_->update(0.f);
current_view_->update(dt_);
current_view_->centerSource(s);
// set this new source as current