GCodeViewer -> Estimated printing time dialog hidden by defaul
This commit is contained in:
parent
51f0fd8912
commit
4700579589
4 changed files with 36 additions and 22 deletions
|
@ -495,6 +495,14 @@ void GCodeViewer::set_layers_z_range(const std::array<double, 2>& layers_z_range
|
||||||
wxGetApp().plater()->update_preview_moves_slider();
|
wxGetApp().plater()->update_preview_moves_slider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GCodeViewer::enable_time_estimate(bool enable)
|
||||||
|
{
|
||||||
|
m_time_estimate_enabled = enable;
|
||||||
|
wxGetApp().update_ui_from_settings();
|
||||||
|
wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
|
||||||
|
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();
|
||||||
|
}
|
||||||
|
|
||||||
void GCodeViewer::export_toolpaths_to_obj(const char* filename) const
|
void GCodeViewer::export_toolpaths_to_obj(const char* filename) const
|
||||||
{
|
{
|
||||||
if (filename == nullptr)
|
if (filename == nullptr)
|
||||||
|
|
|
@ -341,7 +341,7 @@ private:
|
||||||
Shells m_shells;
|
Shells m_shells;
|
||||||
EViewType m_view_type{ EViewType::FeatureType };
|
EViewType m_view_type{ EViewType::FeatureType };
|
||||||
bool m_legend_enabled{ true };
|
bool m_legend_enabled{ true };
|
||||||
bool m_time_estimate_enabled{ true };
|
bool m_time_estimate_enabled{ false };
|
||||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
mutable Statistics m_statistics;
|
mutable Statistics m_statistics;
|
||||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
@ -398,7 +398,7 @@ public:
|
||||||
void enable_legend(bool enable) { m_legend_enabled = enable; }
|
void enable_legend(bool enable) { m_legend_enabled = enable; }
|
||||||
|
|
||||||
bool is_time_estimate_enabled() const { return m_time_estimate_enabled; }
|
bool is_time_estimate_enabled() const { return m_time_estimate_enabled; }
|
||||||
void enable_time_estimate(bool enable) { m_time_estimate_enabled = enable; }
|
void enable_time_estimate(bool enable);
|
||||||
|
|
||||||
void export_toolpaths_to_obj(const char* filename) const;
|
void export_toolpaths_to_obj(const char* filename) const;
|
||||||
|
|
||||||
|
|
|
@ -558,6 +558,7 @@ public:
|
||||||
void reset_gcode_toolpaths() { m_gcode_viewer.reset(); }
|
void reset_gcode_toolpaths() { m_gcode_viewer.reset(); }
|
||||||
const GCodeViewer::SequentialView& get_gcode_sequential_view() const { return m_gcode_viewer.get_sequential_view(); }
|
const GCodeViewer::SequentialView& get_gcode_sequential_view() const { return m_gcode_viewer.get_sequential_view(); }
|
||||||
void update_gcode_sequential_view_current(unsigned int first, unsigned int last) { m_gcode_viewer.update_sequential_view_current(first, last); }
|
void update_gcode_sequential_view_current(unsigned int first, unsigned int last) { m_gcode_viewer.update_sequential_view_current(first, last); }
|
||||||
|
bool is_time_estimate_enabled() const { return m_gcode_viewer.is_time_estimate_enabled(); }
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
|
||||||
void toggle_sla_auxiliaries_visibility(bool visible, const ModelObject* mo = nullptr, int instance_idx = -1);
|
void toggle_sla_auxiliaries_visibility(bool visible, const ModelObject* mo = nullptr, int instance_idx = -1);
|
||||||
|
|
|
@ -1323,13 +1323,14 @@ void Sidebar::update_sliced_info_sizer()
|
||||||
p->sliced_info->SetTextAndShow(siCost, info_text, new_label);
|
p->sliced_info->SetTextAndShow(siCost, info_text, new_label);
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
if (ps.estimated_normal_print_time_str == "N/A" && ps.estimated_silent_print_time_str == "N/A")
|
if (p->plater->get_current_canvas3D()->is_time_estimate_enabled() || (ps.estimated_normal_print_time_str == "N/A" && ps.estimated_silent_print_time_str == "N/A"))
|
||||||
#else
|
#else
|
||||||
|
|
||||||
if (ps.estimated_normal_print_time == "N/A" && ps.estimated_silent_print_time == "N/A")
|
if (ps.estimated_normal_print_time == "N/A" && ps.estimated_silent_print_time == "N/A")
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
p->sliced_info->SetTextAndShow(siEstimatedTime, "N/A");
|
p->sliced_info->SetTextAndShow(siEstimatedTime, "N/A");
|
||||||
else {
|
else {
|
||||||
new_label = _L("Estimated printing time") +":";
|
new_label = _L("Estimated printing time") + ":";
|
||||||
info_text = "";
|
info_text = "";
|
||||||
wxString str_color = _L("Color");
|
wxString str_color = _L("Color");
|
||||||
wxString str_pause = _L("Pause");
|
wxString str_pause = _L("Pause");
|
||||||
|
@ -2180,6 +2181,10 @@ void Plater::priv::select_view_3D(const std::string& name)
|
||||||
set_current_panel(view3D);
|
set_current_panel(view3D);
|
||||||
else if (name == "Preview")
|
else if (name == "Preview")
|
||||||
set_current_panel(preview);
|
set_current_panel(preview);
|
||||||
|
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
wxGetApp().update_ui_from_settings();
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plater::priv::select_next_view_3D()
|
void Plater::priv::select_next_view_3D()
|
||||||
|
|
Loading…
Reference in a new issue