mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-09 00:07:45 -07:00
FIX:pop error MessageDialog
jira: STUDIO-9955 Change-Id: I9ce6a68baaa7fc7548817a37c042091ae4b7e73a (cherry picked from commit 3a6784342a8f965c151e9f8e3cdbc1f7983e6f80)
This commit is contained in:
parent
6926626595
commit
31f16dc42e
3 changed files with 24 additions and 11 deletions
|
|
@ -13143,7 +13143,7 @@ Preset *get_printer_preset(MachineObject *obj)
|
|||
return printer_preset;
|
||||
}
|
||||
|
||||
bool check_printer_initialized(MachineObject *obj)
|
||||
bool check_printer_initialized(MachineObject *obj,bool only_warning)
|
||||
{
|
||||
if (!obj)
|
||||
return false;
|
||||
|
|
@ -13163,12 +13163,17 @@ bool check_printer_initialized(MachineObject *obj)
|
|||
}
|
||||
|
||||
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);
|
||||
dlg.ShowModal();
|
||||
if (!only_warning) {
|
||||
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);
|
||||
print_parts_dlg->update_machine_obj(obj);
|
||||
print_parts_dlg->ShowModal();
|
||||
PrinterPartsDialog *print_parts_dlg = new PrinterPartsDialog(nullptr);
|
||||
print_parts_dlg->update_machine_obj(obj);
|
||||
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 true;
|
||||
|
|
@ -15155,7 +15160,7 @@ bool Plater::is_same_printer_for_connected_and_selected()
|
|||
if (obj == nullptr) {
|
||||
return false;
|
||||
}
|
||||
if (!check_printer_initialized(obj))
|
||||
if (!check_printer_initialized(obj,true))
|
||||
return false;
|
||||
std::string machine_print_name = obj->printer_type;
|
||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||
|
|
|
|||
|
|
@ -896,8 +896,9 @@ std::vector<int> get_min_flush_volumes(const DynamicPrintConfig &full_config, si
|
|||
|
||||
Preset *get_printer_preset(MachineObject *obj);
|
||||
wxArrayString get_all_camera_view_type();
|
||||
bool check_printer_initialized(MachineObject* obj);
|
||||
} // namespace GUI
|
||||
|
||||
bool check_printer_initialized(MachineObject *obj, bool only_warning = false);
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif
|
||||
|
|
@ -4414,7 +4414,11 @@ SyncNozzleAndAmsDialog::SyncNozzleAndAmsDialog(wxWindow *parent, InputInfo &inpu
|
|||
|
||||
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() {
|
||||
//SyncAmsInfoDialog::SyncInfo temp_info;
|
||||
//temp_info.connected_printer = true;
|
||||
|
|
@ -4507,7 +4511,10 @@ FinishSyncAmsDialog::FinishSyncAmsDialog(wxWindow *parent, InputInfo &input_info
|
|||
wxGetApp().UpdateFrameDarkUI(this);
|
||||
}
|
||||
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_cancel() {}
|
||||
void FinishSyncAmsDialog::on_hide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue