GCode tool marker set as visible by default

This commit is contained in:
enricoturri1966 2020-11-03 09:27:18 +01:00
parent eff95bcdb2
commit f94e94f53e
3 changed files with 11 additions and 9 deletions

View File

@ -493,8 +493,10 @@ void GCodeViewer::render() const
glsafe(::glEnable(GL_DEPTH_TEST)); glsafe(::glEnable(GL_DEPTH_TEST));
render_toolpaths(); render_toolpaths();
m_sequential_view.marker.set_world_position(m_sequential_view.current_position); if (m_sequential_view.current.last != m_sequential_view.endpoints.last) {
m_sequential_view.marker.render(); m_sequential_view.marker.set_world_position(m_sequential_view.current_position);
m_sequential_view.marker.render();
}
render_shells(); render_shells();
render_legend(); render_legend();
#if ENABLE_GCODE_VIEWER_STATISTICS #if ENABLE_GCODE_VIEWER_STATISTICS

View File

@ -343,7 +343,7 @@ public:
Transform3f m_world_transform; Transform3f m_world_transform;
float m_z_offset{ 0.5f }; float m_z_offset{ 0.5f };
std::array<float, 4> m_color{ 1.0f, 1.0f, 1.0f, 0.5f }; std::array<float, 4> m_color{ 1.0f, 1.0f, 1.0f, 0.5f };
bool m_visible{ false }; bool m_visible{ true };
public: public:
void init(); void init();

View File

@ -325,16 +325,16 @@ bool Preview::init(wxWindow* parent, Model* model)
get_option_type_string(OptionType::PausePrints) + "|0|" + get_option_type_string(OptionType::PausePrints) + "|0|" +
get_option_type_string(OptionType::CustomGCodes) + "|0|" + get_option_type_string(OptionType::CustomGCodes) + "|0|" +
get_option_type_string(OptionType::Shells) + "|0|" + get_option_type_string(OptionType::Shells) + "|0|" +
get_option_type_string(OptionType::ToolMarker) + "|0|" + get_option_type_string(OptionType::ToolMarker) + "|1|" +
get_option_type_string(OptionType::Legend) + "|1" get_option_type_string(OptionType::Legend) + "|1"
); );
Slic3r::GUI::create_combochecklist(m_combochecklist_options, GUI::into_u8(_L("Options")), options_items); Slic3r::GUI::create_combochecklist(m_combochecklist_options, GUI::into_u8(_L("Options")), options_items);
#else #else
m_checkbox_travel = new wxCheckBox(this, wxID_ANY, _(L("Travel"))); m_checkbox_travel = new wxCheckBox(this, wxID_ANY, _L("Travel"));
m_checkbox_retractions = new wxCheckBox(this, wxID_ANY, _(L("Retractions"))); m_checkbox_retractions = new wxCheckBox(this, wxID_ANY, _L("Retractions"));
m_checkbox_unretractions = new wxCheckBox(this, wxID_ANY, _(L("Deretractions"))); m_checkbox_unretractions = new wxCheckBox(this, wxID_ANY, _L("Deretractions"));
m_checkbox_shells = new wxCheckBox(this, wxID_ANY, _(L("Shells"))); m_checkbox_shells = new wxCheckBox(this, wxID_ANY, _L("Shells"));
m_checkbox_legend = new wxCheckBox(this, wxID_ANY, _(L("Legend"))); m_checkbox_legend = new wxCheckBox(this, wxID_ANY, _L("Legend"));
m_checkbox_legend->SetValue(true); m_checkbox_legend->SetValue(true);
#endif // ENABLE_GCODE_VIEWER #endif // ENABLE_GCODE_VIEWER