mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 14:20:40 +08:00
FIX: unable to send file to sd card if plate > 1
1. Should set plate index before send file jira:STUDIO-12431 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Id7828069a81f5671b0a6b90d7b0c9b703b10a9cc
This commit is contained in:
parent
19ee0a3777
commit
fd1e17f818
@ -849,7 +849,7 @@ public:
|
||||
|
||||
Bind(wxEVT_PAINT, [this](wxPaintEvent& evt) {
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(wxColour(0xEEEEEE));
|
||||
dc.SetPen(wxColour("#EEEEEE"));
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
|
||||
});
|
||||
@ -906,8 +906,8 @@ ExtruderGroup::ExtruderGroup(wxWindow * parent, int index, wxString const &title
|
||||
: StaticGroup(parent, wxID_ANY, title)
|
||||
{
|
||||
SetFont(Label::Body_10);
|
||||
SetForegroundColour(wxColour(0xCECECE));
|
||||
SetBorderColor(wxColour(0xEEEEEE));
|
||||
SetForegroundColour(wxColour("#CECECE"));
|
||||
SetBorderColor(wxColour("#EEEEEE"));
|
||||
ShowBadge(true);
|
||||
// Nozzle
|
||||
wxStaticText *label_diameter = new wxStaticText(this, wxID_ANY, _L("Diameter"));
|
||||
@ -5279,7 +5279,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
return std::vector<size_t>();
|
||||
|
||||
if (!input_files.empty())
|
||||
q->m_3mf_path = input_files[0].string();
|
||||
q->m_3mf_path = input_files[0].string();
|
||||
|
||||
// BBS
|
||||
int filaments_cnt = config->opt<ConfigOptionStrings>("filament_colour")->values.size();
|
||||
@ -9946,6 +9946,17 @@ void Plater::get_print_job_data(PrintPrepareData* data)
|
||||
}
|
||||
}
|
||||
|
||||
void Plater::set_print_job_plate_idx(int plate_idx)
|
||||
{
|
||||
if (plate_idx == PLATE_CURRENT_IDX) {
|
||||
p->m_print_job_data.plate_idx = get_partplate_list().get_curr_plate_index();
|
||||
}
|
||||
else {
|
||||
p->m_print_job_data.plate_idx = plate_idx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int Plater::get_send_calibration_finished_event()
|
||||
{
|
||||
return EVT_SEND_CALIBRATION_FINISHED;
|
||||
@ -15028,14 +15039,7 @@ int Plater::send_gcode(int plate_idx, Export3mfProgressFn proFn)
|
||||
{
|
||||
int result = 0;
|
||||
/* generate 3mf */
|
||||
|
||||
if (plate_idx == PLATE_CURRENT_IDX) {
|
||||
p->m_print_job_data.plate_idx = get_partplate_list().get_curr_plate_index();
|
||||
}
|
||||
else {
|
||||
p->m_print_job_data.plate_idx = plate_idx;
|
||||
}
|
||||
|
||||
set_print_job_plate_idx(plate_idx);
|
||||
|
||||
PartPlate* plate = get_partplate_list().get_curr_plate();
|
||||
try {
|
||||
@ -15064,12 +15068,7 @@ int Plater::export_config_3mf(int plate_idx, Export3mfProgressFn proFn)
|
||||
{
|
||||
int result = 0;
|
||||
/* generate 3mf */
|
||||
if (plate_idx == PLATE_CURRENT_IDX) {
|
||||
p->m_print_job_data.plate_idx = get_partplate_list().get_curr_plate_index();
|
||||
}
|
||||
else {
|
||||
p->m_print_job_data.plate_idx = plate_idx;
|
||||
}
|
||||
set_print_job_plate_idx(plate_idx);
|
||||
|
||||
PartPlate* plate = get_partplate_list().get_curr_plate();
|
||||
try {
|
||||
|
@ -568,6 +568,8 @@ public:
|
||||
int get_prepare_state();
|
||||
//BBS: add print job releated functions
|
||||
void get_print_job_data(PrintPrepareData* data);
|
||||
void set_print_job_plate_idx(int plate_idx);
|
||||
|
||||
int get_send_calibration_finished_event();
|
||||
int get_print_finished_event();
|
||||
int get_send_finished_event();
|
||||
|
@ -849,8 +849,10 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
|
||||
// enter sending mode
|
||||
sending_mode();
|
||||
|
||||
if (wxGetApp().plater()->using_exported_file())
|
||||
result = 0;
|
||||
if (wxGetApp().plater()->using_exported_file()) {
|
||||
m_plater->set_print_job_plate_idx(m_print_plate_idx);
|
||||
result = 0;
|
||||
}
|
||||
else {
|
||||
result = m_plater->send_gcode(m_print_plate_idx, [this](int export_stage, int current, int total, bool &cancel) {
|
||||
if (this->m_is_canceled) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user