mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 18:21:18 -06:00
Delete color changes for unused extruders
This commit is contained in:
parent
8ec1465ea5
commit
0fb8b2ce09
5 changed files with 58 additions and 8 deletions
|
|
@ -29,6 +29,7 @@
|
|||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#include "I18N.hpp"
|
||||
#include "GUI.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
|
@ -84,6 +85,14 @@ void BackgroundSlicingProcess::process_fff()
|
|||
m_print->process();
|
||||
wxQueueEvent(GUI::wxGetApp().mainframe->m_plater, new wxCommandEvent(m_event_slicing_completed_id));
|
||||
m_fff_print->export_gcode(m_temp_output_path, m_gcode_preview_data);
|
||||
|
||||
if (m_fff_print->model().custom_gcode_per_height != GUI::wxGetApp().model().custom_gcode_per_height) {
|
||||
GUI::wxGetApp().model().custom_gcode_per_height = m_fff_print->model().custom_gcode_per_height;
|
||||
// #ys_FIXME : controll text
|
||||
GUI::show_info(nullptr, _(L("To except of redundant tool manipulation, \n"
|
||||
"Color change(s) for unused extruder(s) was(were) deleted")), _(L("Info")));
|
||||
}
|
||||
|
||||
if (this->set_step_started(bspsGCodeFinalize)) {
|
||||
if (! m_export_path.empty()) {
|
||||
//FIXME localize the messages
|
||||
|
|
|
|||
|
|
@ -5338,11 +5338,6 @@ void GLCanvas3D::_load_gcode_extrusion_paths(const GCodePreviewData& preview_dat
|
|||
case GCodePreviewData::Extrusion::ColorPrint:
|
||||
{
|
||||
int color_cnt = (int)tool_colors.size() / 4;
|
||||
|
||||
// int val = int(value);
|
||||
// while (val >= color_cnt)
|
||||
// val -= color_cnt;
|
||||
|
||||
int val = value > color_cnt ? color_cnt - 1 : value;
|
||||
|
||||
GCodePreviewData::Color color;
|
||||
|
|
|
|||
|
|
@ -592,8 +592,8 @@ void Preview::update_view_type(bool slice_completed)
|
|||
_(L("Feature type"));
|
||||
*/
|
||||
|
||||
const wxString& choice = !wxGetApp().plater()->model().custom_gcode_per_height.empty() &&
|
||||
(wxGetApp().extruders_edited_cnt()==1 || !slice_completed) ?
|
||||
const wxString& choice = !wxGetApp().plater()->model().custom_gcode_per_height.empty() /*&&
|
||||
(wxGetApp().extruders_edited_cnt()==1 || !slice_completed) */?
|
||||
_(L("Color Print")) :
|
||||
config.option<ConfigOptionFloats>("wiping_volumes_matrix")->values.size() > 1 ?
|
||||
_(L("Tool")) :
|
||||
|
|
|
|||
|
|
@ -2560,6 +2560,9 @@ void DoubleSlider::SetTicksValues(const std::vector<t_custom_code>& heights)
|
|||
if (!was_empty && m_ticks_.empty() && m_state != msMultiExtruder)
|
||||
// Switch to the "Feature type"/"Tool" from the very beginning of a new object slicing after deleting of the old one
|
||||
wxPostEvent(this->GetParent(), wxCommandEvent(wxCUSTOMEVT_TICKSCHANGED));
|
||||
|
||||
Refresh();
|
||||
Update();
|
||||
}
|
||||
|
||||
void DoubleSlider::get_lower_and_higher_position(int& lower_pos, int& higher_pos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue