mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX: [STUDIO-1575] end dialog with wxID_ABORT on user end session
Change-Id: Ie509b5780a5d11572eadd6dee2fd93903c128c17
This commit is contained in:
parent
a6e3d63576
commit
6763968461
2 changed files with 6 additions and 3 deletions
|
@ -2064,7 +2064,7 @@ bool GUI_App::on_init_inner()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (auto d : dialogStack)
|
for (auto d : dialogStack)
|
||||||
d->EndModal(wxID_CANCEL);
|
d->EndModal(wxID_ABORT);
|
||||||
});
|
});
|
||||||
|
|
||||||
std::map<std::string, std::string> extra_headers = get_extra_header();
|
std::map<std::string, std::string> extra_headers = get_extra_header();
|
||||||
|
|
|
@ -827,7 +827,8 @@ bool GuideFrame::run()
|
||||||
app.preset_bundle->export_selections(*app.app_config);
|
app.preset_bundle->export_selections(*app.app_config);
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "GuideFrame before ShowModal";
|
BOOST_LOG_TRIVIAL(info) << "GuideFrame before ShowModal";
|
||||||
if (this->ShowModal() == wxID_OK) {
|
int result = this->ShowModal();
|
||||||
|
if (result == wxID_OK) {
|
||||||
bool apply_keeped_changes = false;
|
bool apply_keeped_changes = false;
|
||||||
BOOST_LOG_TRIVIAL(info) << "GuideFrame returned ok";
|
BOOST_LOG_TRIVIAL(info) << "GuideFrame returned ok";
|
||||||
if (! this->apply_config(app.app_config, app.preset_bundle, app.preset_updater, apply_keeped_changes))
|
if (! this->apply_config(app.app_config, app.preset_bundle, app.preset_updater, apply_keeped_changes))
|
||||||
|
@ -843,7 +844,7 @@ bool GuideFrame::run()
|
||||||
BOOST_LOG_TRIVIAL(info) << "GuideFrame applied";
|
BOOST_LOG_TRIVIAL(info) << "GuideFrame applied";
|
||||||
this->Close();
|
this->Close();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else if (result == wxID_CANCEL) {
|
||||||
BOOST_LOG_TRIVIAL(info) << "GuideFrame cancelled";
|
BOOST_LOG_TRIVIAL(info) << "GuideFrame cancelled";
|
||||||
if (app.preset_bundle->printers.only_default_printers()) {
|
if (app.preset_bundle->printers.only_default_printers()) {
|
||||||
//we install the default here
|
//we install the default here
|
||||||
|
@ -861,6 +862,8 @@ bool GuideFrame::run()
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GuideFrame::GetFilamentInfo( std::string VendorDirectory, json & pFilaList, std::string filepath, std::string &sVendor, std::string &sType)
|
int GuideFrame::GetFilamentInfo( std::string VendorDirectory, json & pFilaList, std::string filepath, std::string &sVendor, std::string &sType)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue