Bugfix play selection

This commit is contained in:
Bruno Herbelin
2022-02-15 23:44:14 +01:00
parent 6b672acdc7
commit a28e4be5a3

View File

@@ -2155,6 +2155,9 @@ void SourceController::Update()
SourceList selectedsources; SourceList selectedsources;
if (Settings::application.widget.media_player == false)
selection_.clear();
// get new selection or validate previous list if selection was not updated // get new selection or validate previous list if selection was not updated
selectedsources = Mixer::manager().validate(selection_); selectedsources = Mixer::manager().validate(selection_);
if (selectedsources.empty() && !Mixer::selection().empty()) if (selectedsources.empty() && !Mixer::selection().empty())
@@ -2225,7 +2228,6 @@ void SourceController::Render()
{ {
if (ImGuiToolkit::IconButton(4,16)){ if (ImGuiToolkit::IconButton(4,16)){
Settings::application.widget.media_player = false; Settings::application.widget.media_player = false;
selection_.clear();
} }
if (ImGui::BeginMenu(IMGUI_TITLE_MEDIAPLAYER)) if (ImGui::BeginMenu(IMGUI_TITLE_MEDIAPLAYER))
{ {