FIX:close gcode.3mf not pop window that should not appear
jira: STUDIO-9821 Change-Id: I09994c23d977794e9b2a375bf169e841782d9481
This commit is contained in:
parent
d34a8cb2ee
commit
05e006ba11
|
@ -2699,7 +2699,7 @@ bool Sidebar::is_new_project_in_gcode3mf()
|
||||||
confirm_dlg.update_btn_label(_L("Yes"), _L("No"));
|
confirm_dlg.update_btn_label(_L("Yes"), _L("No"));
|
||||||
auto filename = p->plater->get_preview_only_filename();
|
auto filename = p->plater->get_preview_only_filename();
|
||||||
|
|
||||||
confirm_dlg.update_text(filename + " " + _L("will be closed before modify filament. Do you want to continue?"));
|
confirm_dlg.update_text(filename + " " + _L("will be closed before your operation. Do you want to continue?"));
|
||||||
confirm_dlg.on_show();
|
confirm_dlg.on_show();
|
||||||
if (is_cancle) {
|
if (is_cancle) {
|
||||||
this->printer_combox()->update();
|
this->printer_combox()->update();
|
||||||
|
@ -6233,7 +6233,7 @@ void Plater::priv::reset(bool apply_presets_change)
|
||||||
Plater::TakeSnapshot snapshot(q, "Reset Project", UndoRedo::SnapshotType::ProjectSeparator);
|
Plater::TakeSnapshot snapshot(q, "Reset Project", UndoRedo::SnapshotType::ProjectSeparator);
|
||||||
|
|
||||||
clear_warnings();
|
clear_warnings();
|
||||||
|
q->reset_flags_when_new_or_close_project();
|
||||||
set_project_filename("");
|
set_project_filename("");
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " call set_project_filename: empty";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " call set_project_filename: empty";
|
||||||
|
|
||||||
|
@ -10498,6 +10498,13 @@ Print& Plater::fff_print() { return p->fff_print; }
|
||||||
const SLAPrint& Plater::sla_print() const { return p->sla_print; }
|
const SLAPrint& Plater::sla_print() const { return p->sla_print; }
|
||||||
SLAPrint& Plater::sla_print() { return p->sla_print; }
|
SLAPrint& Plater::sla_print() { return p->sla_print; }
|
||||||
|
|
||||||
|
void Plater::reset_flags_when_new_or_close_project()
|
||||||
|
{
|
||||||
|
m_only_gcode = false;
|
||||||
|
m_exported_file = false;
|
||||||
|
m_loading_project = false;
|
||||||
|
}
|
||||||
|
|
||||||
int Plater::new_project(bool skip_confirm, bool silent, const wxString &project_name)
|
int Plater::new_project(bool skip_confirm, bool silent, const wxString &project_name)
|
||||||
{
|
{
|
||||||
bool transfer_preset_changes = false;
|
bool transfer_preset_changes = false;
|
||||||
|
@ -10519,9 +10526,7 @@ int Plater::new_project(bool skip_confirm, bool silent, const wxString &project_
|
||||||
//BBS: add only gcode mode
|
//BBS: add only gcode mode
|
||||||
bool previous_gcode = m_only_gcode;
|
bool previous_gcode = m_only_gcode;
|
||||||
|
|
||||||
m_only_gcode = false;
|
reset_flags_when_new_or_close_project();
|
||||||
m_exported_file = false;
|
|
||||||
m_loading_project = false;
|
|
||||||
get_notification_manager()->clear_all();
|
get_notification_manager()->clear_all();
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
|
|
|
@ -266,6 +266,7 @@ public:
|
||||||
const SLAPrint& sla_print() const;
|
const SLAPrint& sla_print() const;
|
||||||
SLAPrint& sla_print();
|
SLAPrint& sla_print();
|
||||||
|
|
||||||
|
void reset_flags_when_new_or_close_project();
|
||||||
int new_project(bool skip_confirm = false, bool silent = false, const wxString &project_name = wxString());
|
int new_project(bool skip_confirm = false, bool silent = false, const wxString &project_name = wxString());
|
||||||
// BBS: save & backup
|
// BBS: save & backup
|
||||||
int load_project(wxString const & filename = "", wxString const & originfile = "-");
|
int load_project(wxString const & filename = "", wxString const & originfile = "-");
|
||||||
|
|
Loading…
Reference in New Issue