mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-26 08:27:43 +01:00
fix incorrect logic when loading session via NextStep document API [Reviewed by] Paul Davis
This commit is contained in:
parent
006c1d2104
commit
b8ef3293da
2 changed files with 10 additions and 15 deletions
|
|
@ -775,7 +775,7 @@ ARDOUR_UI::starting ()
|
|||
const char *nsm_url;
|
||||
|
||||
app->ShouldQuit.connect (sigc::mem_fun (*this, &ARDOUR_UI::queue_finish));
|
||||
app->ShouldLoad.connect (sigc::mem_fun (*this, &ARDOUR_UI::idle_load));
|
||||
app->ShouldLoad.connect (sigc::mem_fun (*this, &ARDOUR_UI::load_from_application_api));
|
||||
|
||||
if (!Profile->get_trx() && ARDOUR_COMMAND_LINE::check_announcements) {
|
||||
check_announcements ();
|
||||
|
|
@ -2703,20 +2703,15 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::idle_load (const std::string& path)
|
||||
ARDOUR_UI::load_from_application_api (const std::string& path)
|
||||
{
|
||||
if (_session) {
|
||||
if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
|
||||
/* /path/to/foo => /path/to/foo, foo */
|
||||
load_session (path, basename_nosuffix (path));
|
||||
} else {
|
||||
/* /path/to/foo/foo.ardour => /path/to/foo, foo */
|
||||
load_session (Glib::path_get_dirname (path), basename_nosuffix (path));
|
||||
}
|
||||
|
||||
} else {
|
||||
ARDOUR_COMMAND_LINE::session_name = path;
|
||||
}
|
||||
ARDOUR_COMMAND_LINE::session_name = path;
|
||||
|
||||
if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
|
||||
load_session (path, basename_nosuffix (path));
|
||||
} else {
|
||||
load_session (Glib::path_get_dirname (path), basename_nosuffix (path));
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void hide_about ();
|
||||
void open_media_folder ();
|
||||
|
||||
void idle_load (const std::string& path);
|
||||
void load_from_application_api (const std::string& path);
|
||||
void finish();
|
||||
|
||||
int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue