mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-05 14:27:42 -07: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 (cherry picked from commit fd1e17f818c5c8e38d207e1e829dc5c5749e6f65)
This commit is contained in:
parent
d58a93b501
commit
ace6e614ad
3 changed files with 23 additions and 20 deletions
|
|
@ -906,7 +906,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);
|
||||
});
|
||||
|
|
@ -963,8 +963,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"));
|
||||
|
|
@ -5205,7 +5205,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();
|
||||
|
||||
// SoftFever: ugly fix so we can exist pa calib mode
|
||||
background_process.fff_print()->calib_mode() = CalibMode::Calib_None;
|
||||
|
|
@ -9723,6 +9723,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;
|
||||
|
|
@ -14869,14 +14880,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 {
|
||||
|
|
@ -14905,12 +14909,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 {
|
||||
|
|
|
|||
|
|
@ -603,6 +603,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();
|
||||
|
|
|
|||
|
|
@ -836,8 +836,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…
Add table
Add a link
Reference in a new issue