FIX:pop error MessageDialog
jira: STUDIO-9955 Change-Id: I9ce6a68baaa7fc7548817a37c042091ae4b7e73a
This commit is contained in:
parent
543eb6f4e2
commit
3a6784342a
|
@ -13207,7 +13207,7 @@ Preset *get_printer_preset(MachineObject *obj)
|
||||||
return printer_preset;
|
return printer_preset;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool check_printer_initialized(MachineObject *obj)
|
bool check_printer_initialized(MachineObject *obj,bool only_warning)
|
||||||
{
|
{
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return false;
|
return false;
|
||||||
|
@ -13227,12 +13227,17 @@ bool check_printer_initialized(MachineObject *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!has_been_initialized) {
|
if (!has_been_initialized) {
|
||||||
MessageDialog dlg(wxGetApp().plater(), _L("The nozzle type is not set. Please set the nozzle and try again."), _L("Warning"), wxOK | wxICON_WARNING);
|
if (!only_warning) {
|
||||||
dlg.ShowModal();
|
MessageDialog dlg(wxGetApp().plater(), _L("The nozzle type is not set. Please set the nozzle and try again."), _L("Warning"), wxOK | wxICON_WARNING);
|
||||||
|
dlg.ShowModal();
|
||||||
|
|
||||||
PrinterPartsDialog* print_parts_dlg = new PrinterPartsDialog(nullptr);
|
PrinterPartsDialog *print_parts_dlg = new PrinterPartsDialog(nullptr);
|
||||||
print_parts_dlg->update_machine_obj(obj);
|
print_parts_dlg->update_machine_obj(obj);
|
||||||
print_parts_dlg->ShowModal();
|
print_parts_dlg->ShowModal();
|
||||||
|
} else {
|
||||||
|
MessageDialog dlg(wxGetApp().plater(), _L("Printer not connected. Please connect or choose a printer on the Device page and try again."), _L("Warning"), wxOK | wxICON_WARNING);
|
||||||
|
dlg.ShowModal();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -15212,7 +15217,7 @@ bool Plater::is_same_printer_for_connected_and_selected()
|
||||||
if (obj == nullptr) {
|
if (obj == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!check_printer_initialized(obj))
|
if (!check_printer_initialized(obj,true))
|
||||||
return false;
|
return false;
|
||||||
std::string machine_print_name = obj->printer_type;
|
std::string machine_print_name = obj->printer_type;
|
||||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||||
|
|
|
@ -853,7 +853,7 @@ std::string check_boolean_possible(const std::vector<const ModelVolume *> &
|
||||||
Preset *get_printer_preset(MachineObject *obj);
|
Preset *get_printer_preset(MachineObject *obj);
|
||||||
wxArrayString get_all_camera_view_type();
|
wxArrayString get_all_camera_view_type();
|
||||||
|
|
||||||
bool check_printer_initialized(MachineObject* obj);
|
bool check_printer_initialized(MachineObject *obj, bool only_warning = false);
|
||||||
} // namespace GUI
|
} // namespace GUI
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
|
||||||
|
|
|
@ -4421,7 +4421,11 @@ SyncNozzleAndAmsDialog::SyncNozzleAndAmsDialog(wxWindow *parent, InputInfo &inpu
|
||||||
|
|
||||||
SyncNozzleAndAmsDialog::~SyncNozzleAndAmsDialog() {}
|
SyncNozzleAndAmsDialog::~SyncNozzleAndAmsDialog() {}
|
||||||
|
|
||||||
void SyncNozzleAndAmsDialog::on_dpi_changed(const wxRect &suggested_rect) {}
|
void SyncNozzleAndAmsDialog::on_dpi_changed(const wxRect &suggested_rect)
|
||||||
|
{
|
||||||
|
m_button_ok->Rescale();
|
||||||
|
m_button_cancel->Rescale();
|
||||||
|
}
|
||||||
void SyncNozzleAndAmsDialog::deal_ok() {
|
void SyncNozzleAndAmsDialog::deal_ok() {
|
||||||
//SyncAmsInfoDialog::SyncInfo temp_info;
|
//SyncAmsInfoDialog::SyncInfo temp_info;
|
||||||
//temp_info.connected_printer = true;
|
//temp_info.connected_printer = true;
|
||||||
|
@ -4514,7 +4518,10 @@ FinishSyncAmsDialog::FinishSyncAmsDialog(wxWindow *parent, InputInfo &input_info
|
||||||
wxGetApp().UpdateFrameDarkUI(this);
|
wxGetApp().UpdateFrameDarkUI(this);
|
||||||
}
|
}
|
||||||
FinishSyncAmsDialog::~FinishSyncAmsDialog() {}
|
FinishSyncAmsDialog::~FinishSyncAmsDialog() {}
|
||||||
void FinishSyncAmsDialog::on_dpi_changed(const wxRect &suggested_rect) {}
|
void FinishSyncAmsDialog::on_dpi_changed(const wxRect &suggested_rect)
|
||||||
|
{
|
||||||
|
m_button_ok->Rescale();
|
||||||
|
}
|
||||||
void FinishSyncAmsDialog::deal_ok() { on_hide(); }
|
void FinishSyncAmsDialog::deal_ok() { on_hide(); }
|
||||||
void FinishSyncAmsDialog::deal_cancel() {}
|
void FinishSyncAmsDialog::deal_cancel() {}
|
||||||
void FinishSyncAmsDialog::on_hide()
|
void FinishSyncAmsDialog::on_hide()
|
||||||
|
|
Loading…
Reference in New Issue