ENH:Hide confirmation button when unable to send print
jira:[STUDIO-6355, STUDIO-6332] Change-Id: I8f9c0edea4d5ee70e9fef1e9d42838d598dc32c4
This commit is contained in:
parent
9e39016837
commit
d311b7f142
|
@ -499,6 +499,10 @@ void PrinterPartsDialog::set_nozzle_diameter(wxCommandEvent& evt)
|
||||||
auto nozzle_type = nozzle_type_map[nozzle_type_checkbox->GetSelection()];
|
auto nozzle_type = nozzle_type_map[nozzle_type_checkbox->GetSelection()];
|
||||||
auto nozzle_diameter = std::stof(nozzle_diameter_checkbox->GetStringSelection().ToStdString());
|
auto nozzle_diameter = std::stof(nozzle_diameter_checkbox->GetStringSelection().ToStdString());
|
||||||
nozzle_diameter = round(nozzle_diameter * 10) / 10;
|
nozzle_diameter = round(nozzle_diameter * 10) / 10;
|
||||||
|
|
||||||
|
obj->nozzle_diameter = nozzle_diameter;
|
||||||
|
obj->nozzle_type = nozzle_type;
|
||||||
|
|
||||||
obj->command_set_printer_nozzle(nozzle_type, nozzle_diameter);
|
obj->command_set_printer_nozzle(nozzle_type, nozzle_diameter);
|
||||||
}
|
}
|
||||||
catch (...) {}
|
catch (...) {}
|
||||||
|
|
|
@ -1368,6 +1368,16 @@ void ConfirmBeforeSendDialog::show_update_nozzle_button(bool show)
|
||||||
Layout();
|
Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConfirmBeforeSendDialog::hide_button_ok()
|
||||||
|
{
|
||||||
|
m_button_ok->Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConfirmBeforeSendDialog::edit_cancel_button_txt(wxString txt)
|
||||||
|
{
|
||||||
|
m_button_cancel->SetLabel(txt);
|
||||||
|
}
|
||||||
|
|
||||||
void ConfirmBeforeSendDialog::disable_button_ok()
|
void ConfirmBeforeSendDialog::disable_button_ok()
|
||||||
{
|
{
|
||||||
m_button_ok->Disable();
|
m_button_ok->Disable();
|
||||||
|
|
|
@ -243,6 +243,8 @@ public:
|
||||||
void rescale();
|
void rescale();
|
||||||
void on_dpi_changed(const wxRect& suggested_rect);
|
void on_dpi_changed(const wxRect& suggested_rect);
|
||||||
void show_update_nozzle_button(bool show = false);
|
void show_update_nozzle_button(bool show = false);
|
||||||
|
void hide_button_ok();
|
||||||
|
void edit_cancel_button_txt(wxString txt);
|
||||||
void disable_button_ok();
|
void disable_button_ok();
|
||||||
void enable_button_ok();
|
void enable_button_ok();
|
||||||
wxString format_text(wxString str, int warp);
|
wxString format_text(wxString str, int warp);
|
||||||
|
|
|
@ -2581,7 +2581,8 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
|
||||||
ConfirmBeforeSendDialog confirm_dlg(this, wxID_ANY, confirm_title);
|
ConfirmBeforeSendDialog confirm_dlg(this, wxID_ANY, confirm_title);
|
||||||
|
|
||||||
if(is_printing_block){
|
if(is_printing_block){
|
||||||
confirm_dlg.disable_button_ok();
|
confirm_dlg.hide_button_ok();
|
||||||
|
confirm_dlg.edit_cancel_button_txt(_L("Close"));
|
||||||
confirm_text.push_back(ConfirmBeforeSendInfo(_L("Please fix the error above, otherwise printing cannot continue."), ConfirmBeforeSendInfo::InfoLevel::Warning));
|
confirm_text.push_back(ConfirmBeforeSendInfo(_L("Please fix the error above, otherwise printing cannot continue."), ConfirmBeforeSendInfo::InfoLevel::Warning));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue