From 53ae715816c9cf822f5509168a61cc2fa6f19c58 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Sun, 2 Jan 2022 11:49:02 +0100 Subject: [PATCH] Restart the source after insertion from New Source panel --- UserInterfaceManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index 098ca85..9db6873 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -4734,7 +4734,12 @@ void Navigator::RenderNewPannel() // ask to import the source in the mixer ImGui::NewLine(); if (new_source_preview_.ready() && ImGui::Button( ICON_FA_CHECK " Create", ImVec2(pannel_width_ - padding_width_, 0)) ) { - Mixer::manager().addSource(new_source_preview_.getSource()); + // take out the source from the preview + Source *s = new_source_preview_.getSource(); + // restart and add the source. + Mixer::manager().addSource(s); + s->replay(); + // close NEW pannel selected_button[NAV_NEW] = false; } }