From 207aa88daf399bfa1dd38e5a784f41915151cf9e Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Fri, 3 Mar 2023 20:46:34 +0100 Subject: [PATCH] UX improvement: do not ask user confirmation after file selection Create a source from file; validate the file dialog is enough to create the source (without intermediate step of confirmation). --- src/UserInterfaceManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UserInterfaceManager.cpp b/src/UserInterfaceManager.cpp index f885468..a8fb11f 100644 --- a/src/UserInterfaceManager.cpp +++ b/src/UserInterfaceManager.cpp @@ -7018,8 +7018,9 @@ void Navigator::RenderNewPannel() setNewMedia(MEDIA_RECENT, importpath); // open file if (!importpath.empty()) { - std::string label = BaseToolkit::transliterate( sourceMediaFileCurrent ); - new_source_preview_.setSource( Mixer::manager().createSourceFile(sourceMediaFileCurrent), label); + Mixer::manager().addSource( Mixer::manager().createSourceFile(sourceMediaFileCurrent) ); + // close NEW pannel + togglePannelNew(); } }