Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/slic3r/GUI/GUI_App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10317,6 +10317,18 @@ void GUI_App::MacOpenURL(const wxString& url)
{
if (url.empty())
return;

// Fix for macOS cold start: If not yet post-initialized, store the URL in
// init_params->input_files so that post_init() will detect it and set
// switch_to_3d = true. This prevents trigger_restore_project() from calling
// new_project() which would clear the model that will be loaded from this URL.
// This makes macOS behavior consistent with Windows.
if (!m_post_initialized) {
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": cold start detected, storing URL to init_params: " << url.ToStdString();
this->init_params->input_files.emplace_back(into_u8(url));
return; // post_init() will call start_download() for us
}

start_download(boost::nowide::narrow(url));
}

Expand Down