mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-16 21:42:43 +00:00
FIX:add m_new_project_and_check_state flag
jira: STUDIO-14994 Change-Id: I068b18cfb29622de1641bc34c671d4710c1a07d3 (cherry picked from commit 670fb1764748e0d69cb2b4e657bfbd5c92daff9f)
This commit is contained in:
@@ -11004,6 +11004,7 @@ int Plater::new_project(bool skip_confirm, bool silent, const wxString& project_
|
||||
bool transfer_preset_changes = false;
|
||||
// BBS: save confirm
|
||||
auto check = [this,&transfer_preset_changes](bool yes_or_no) {
|
||||
m_new_project_and_check_state = true;
|
||||
wxString header = _L("Some presets are modified.") + "\n" +
|
||||
(yes_or_no ? _L("You can keep the modified presets to the new project or discard them") :
|
||||
_L("You can keep the modified presets to the new project, discard or save changes as new presets."));
|
||||
@@ -11013,7 +11014,9 @@ int Plater::new_project(bool skip_confirm, bool silent, const wxString& project_
|
||||
if (m_exported_file) { //.gcode.3mf ignore presets modify
|
||||
m_exported_file = false;
|
||||
}
|
||||
return wxGetApp().check_and_keep_current_preset_changes(_L("Creating a new project"), header, act_buttons, &transfer_preset_changes);
|
||||
bool result = wxGetApp().check_and_keep_current_preset_changes(_L("Creating a new project"), header, act_buttons, &transfer_preset_changes);
|
||||
m_new_project_and_check_state = false;
|
||||
return result;
|
||||
};
|
||||
int result;
|
||||
if (!skip_confirm && (result = close_with_confirm(check)) == wxID_CANCEL)
|
||||
@@ -13444,6 +13447,9 @@ void Plater::add_file()
|
||||
|
||||
void Plater::update(bool conside_update_flag, bool force_background_processing_update)
|
||||
{
|
||||
if (is_new_project_and_check_state()) {
|
||||
return;
|
||||
}
|
||||
unsigned int flag = force_background_processing_update ? (unsigned int)Plater::priv::UpdateParams::FORCE_BACKGROUND_PROCESSING_UPDATE : 0;
|
||||
if (conside_update_flag) {
|
||||
if (need_update()) {
|
||||
|
||||
Reference in New Issue
Block a user