FIX:block send to printer function
Change-Id: I04dff128e598b9679d39ece3f60f56ba09cbd72f
This commit is contained in:
parent
55d6bbbe21
commit
529131138a
2 changed files with 18 additions and 18 deletions
|
@ -1247,7 +1247,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
m_print_select = ePrintPlate;
|
||||
|
||||
m_slice_btn = new SideButton(this, _L("Slice"), "");
|
||||
m_print_btn = new SideButton(this, _L("Send and Print"), "");
|
||||
m_print_btn = new SideButton(this, _L("Print"), "");
|
||||
m_print_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
||||
|
||||
update_side_button_style();
|
||||
|
@ -1367,10 +1367,10 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
});
|
||||
|
||||
// upload and print
|
||||
SideButton* send_gcode_btn = new SideButton(p, _L("Send and Print"), "");
|
||||
SideButton* send_gcode_btn = new SideButton(p, _L("Print"), "");
|
||||
send_gcode_btn->SetCornerRadius(0);
|
||||
send_gcode_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Send and Print"));
|
||||
m_print_btn->SetLabel(_L("Print"));
|
||||
m_print_select = eSendGcode;
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
|
@ -1379,7 +1379,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
});
|
||||
|
||||
// upload only
|
||||
SideButton* upload_gcode_btn = new SideButton(p, _L("Send"), "");
|
||||
/*SideButton* upload_gcode_btn = new SideButton(p, _L("Send"), "");
|
||||
upload_gcode_btn->SetCornerRadius(0);
|
||||
upload_gcode_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Send"));
|
||||
|
@ -1388,24 +1388,24 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
m_print_btn->Enable(m_print_enable);
|
||||
this->Layout();
|
||||
p->Dismiss();
|
||||
});
|
||||
});*/
|
||||
|
||||
p->append_button(send_gcode_btn);
|
||||
p->append_button(upload_gcode_btn);
|
||||
//p->append_button(upload_gcode_btn);
|
||||
p->append_button(export_gcode_btn);
|
||||
} else {
|
||||
//Bambu Studio Buttons
|
||||
SideButton* print_plate_btn = new SideButton(p, _L("Send and Print"), "");
|
||||
SideButton* print_plate_btn = new SideButton(p, _L("Print"), "");
|
||||
print_plate_btn->SetCornerRadius(0);
|
||||
|
||||
SideButton* send_to_printer_btn = new SideButton(p, _L("Send"), "");
|
||||
send_to_printer_btn->SetCornerRadius(0);
|
||||
/*SideButton* send_to_printer_btn = new SideButton(p, _L("Send"), "");
|
||||
send_to_printer_btn->SetCornerRadius(0);*/
|
||||
|
||||
SideButton* export_sliced_file_btn = new SideButton(p, _L("Export sliced file"), "");
|
||||
export_sliced_file_btn->SetCornerRadius(0);
|
||||
|
||||
print_plate_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Send and Print"));
|
||||
m_print_btn->SetLabel(_L("Print"));
|
||||
m_print_select = ePrintPlate;
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
|
@ -1413,14 +1413,14 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
p->Dismiss();
|
||||
});
|
||||
|
||||
send_to_printer_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
/*send_to_printer_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Send"));
|
||||
m_print_select = eSendToPrinter;
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
this->Layout();
|
||||
p->Dismiss();
|
||||
});
|
||||
});*/
|
||||
|
||||
export_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Export Sliced File"));
|
||||
|
@ -1431,7 +1431,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
p->Dismiss();
|
||||
});
|
||||
p->append_button(print_plate_btn);
|
||||
p->append_button(send_to_printer_btn);
|
||||
//p->append_button(send_to_printer_btn);
|
||||
p->append_button(export_sliced_file_btn);
|
||||
}
|
||||
|
||||
|
@ -2700,14 +2700,14 @@ void MainFrame::on_config_changed(DynamicPrintConfig* config) const
|
|||
void MainFrame::set_print_button_to_default(PrintSelectType select_type)
|
||||
{
|
||||
if (select_type == PrintSelectType::ePrintPlate) {
|
||||
m_print_btn->SetLabel(_L("Send and Print"));
|
||||
m_print_btn->SetLabel(_L("Print"));
|
||||
m_print_select = ePrintPlate;
|
||||
if (m_print_enable)
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
this->Layout();
|
||||
} else if (select_type == PrintSelectType::eSendGcode) {
|
||||
m_print_btn->SetLabel(_L("Send and Print"));
|
||||
m_print_btn->SetLabel(_L("Print"));
|
||||
m_print_select = eSendGcode;
|
||||
if (m_print_enable)
|
||||
m_print_enable = get_enable_print_status();
|
||||
|
|
|
@ -913,7 +913,7 @@ wxString SelectMachineDialog::format_text(wxString &m_msg)
|
|||
}
|
||||
|
||||
SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
: DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, _L("Send and Print"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
|
||||
: DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, _L("Send print job to"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
|
||||
, m_plater(plater), m_export_3mf_cancel(false)
|
||||
, m_mapping_popup(AmsMapingPopup(this))
|
||||
, m_mapping_tip_popup(AmsMapingTipPopup(this))
|
||||
|
@ -1054,7 +1054,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
|||
m_sizer_prepare->Add(0, 0, 1, wxTOP, FromDIP(12));
|
||||
|
||||
auto hyperlink_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
auto m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Can't connect to the printer"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
auto m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
|
||||
//auto linkimg = new wxStaticBitmap(m_panel_prepare, wxID_ANY, create_scaled_bitmap("link_wiki_img", this, 18), wxDefaultPosition, wxSize(FromDIP(18), FromDIP(18)), 0);
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
|||
|
||||
|
||||
m_sizer_pcont->Add(0, 0, 1, wxEXPAND, 0);
|
||||
m_button_ensure = new Button(m_panel_prepare, _L("Print"));
|
||||
m_button_ensure = new Button(m_panel_prepare, _L("Send"));
|
||||
m_button_ensure->SetBackgroundColor(btn_bg_enable);
|
||||
m_button_ensure->SetBorderColor(btn_bg_enable);
|
||||
m_button_ensure->SetTextColor(*wxWHITE);
|
||||
|
|
Loading…
Reference in a new issue