FIX: STUDIO-273
wxWidgets report error when opening some 3mf files with specific names Change-Id: I3573564df43da045714846a373021e125f39551e (cherry picked from commit 4c7f8f93f7f207a0c2b35f9997af85a245e1cb19)
This commit is contained in:
parent
573bcc7de9
commit
d720dc8618
|
@ -53,7 +53,16 @@ int GUI_Run(GUI_InitParams ¶ms)
|
|||
GUI::GUI_App::SetInstance(gui);
|
||||
gui->init_params = ¶ms;
|
||||
|
||||
return wxEntry(params.argc, params.argv);
|
||||
if (params.argc > 1) {
|
||||
// STUDIO-273 wxWidgets report error when opening some files with specific names
|
||||
// wxWidgets does not handle parameters, so intercept parameters here, only keep the app name
|
||||
int argc = 1;
|
||||
std::vector<char *> argv;
|
||||
argv.push_back(params.argv[0]);
|
||||
return wxEntry(argc, argv.data());
|
||||
} else {
|
||||
return wxEntry(params.argc, params.argv);
|
||||
}
|
||||
} catch (const Slic3r::Exception &ex) {
|
||||
BOOST_LOG_TRIVIAL(error) << ex.what() << std::endl;
|
||||
wxMessageBox(boost::nowide::widen(ex.what()), _L("Bambu Studio GUI initialization failed"), wxICON_STOP);
|
||||
|
|
Loading…
Reference in New Issue