Horizontal slider in preview to show always (and only) gcode lines indices
This commit is contained in:
parent
226353452e
commit
86da45eb66
@ -155,9 +155,6 @@ void AppConfig::set_defaults()
|
||||
if (get("seq_top_layer_only").empty())
|
||||
set("seq_top_layer_only", "1");
|
||||
|
||||
if (get("seq_top_gcode_indices").empty())
|
||||
set("seq_top_gcode_indices", "1");
|
||||
|
||||
if (get("use_perspective_camera").empty())
|
||||
set("use_perspective_camera", "1");
|
||||
|
||||
|
@ -739,11 +739,8 @@ wxString Control::get_label(int tick, LabelType label_type/* = ltHeightWithLayer
|
||||
return size_t(it - m_layers_values.begin());
|
||||
};
|
||||
|
||||
if (m_draw_mode == dmSequentialGCodeView) {
|
||||
return (Slic3r::GUI::get_app_config()->get("seq_top_gcode_indices") == "1") ?
|
||||
wxString::Format("%lu", static_cast<unsigned long>(m_alternate_values[value])) :
|
||||
wxString::Format("%lu", static_cast<unsigned long>(m_values[value]));
|
||||
}
|
||||
if (m_draw_mode == dmSequentialGCodeView)
|
||||
return wxString::Format("%lu", static_cast<unsigned long>(m_alternate_values[value]));
|
||||
else {
|
||||
if (label_type == ltEstimatedTime) {
|
||||
if (m_is_wipe_tower) {
|
||||
|
@ -1908,7 +1908,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
||||
PreferencesDialog dlg(mainframe);
|
||||
dlg.ShowModal();
|
||||
app_layout_changed = dlg.settings_layout_changed();
|
||||
if (dlg.seq_top_layer_only_changed() || dlg.seq_seq_top_gcode_indices_changed())
|
||||
if (dlg.seq_top_layer_only_changed())
|
||||
this->plater_->refresh_print();
|
||||
|
||||
if (dlg.recreate_GUI()) {
|
||||
|
@ -292,14 +292,6 @@ void PreferencesDialog::build()
|
||||
option = Option(def, "seq_top_layer_only");
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
|
||||
def.label = L("Sequential slider shows gcode line numbers");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("If enabled, the sequential slider, in preview, shows the gcode lines numbers."
|
||||
"If disabled, the sequential slider, in preview, shows the move index.");
|
||||
def.set_default_value(new ConfigOptionBool{ app_config->get("seq_top_gcode_indices") == "1" });
|
||||
option = Option(def, "seq_top_gcode_indices");
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
|
||||
if (is_editor) {
|
||||
def.label = L("Show sidebar collapse/expand button");
|
||||
def.type = coBool;
|
||||
@ -436,10 +428,6 @@ void PreferencesDialog::accept(wxEvent&)
|
||||
if (auto it = m_values.find("seq_top_layer_only"); it != m_values.end())
|
||||
m_seq_top_layer_only_changed = app_config->get("seq_top_layer_only") != it->second;
|
||||
|
||||
m_seq_top_gcode_indices_changed = false;
|
||||
if (auto it = m_values.find("seq_top_gcode_indices"); it != m_values.end())
|
||||
m_seq_top_gcode_indices_changed = app_config->get("seq_top_gcode_indices") != it->second;
|
||||
|
||||
m_settings_layout_changed = false;
|
||||
for (const std::string& key : { "old_settings_layout_mode",
|
||||
"new_settings_layout_mode",
|
||||
|
@ -29,7 +29,6 @@ class PreferencesDialog : public DPIDialog
|
||||
bool isOSX {false};
|
||||
bool m_settings_layout_changed {false};
|
||||
bool m_seq_top_layer_only_changed{ false };
|
||||
bool m_seq_top_gcode_indices_changed{ false };
|
||||
bool m_recreate_GUI{false};
|
||||
|
||||
public:
|
||||
@ -38,7 +37,6 @@ public:
|
||||
|
||||
bool settings_layout_changed() const { return m_settings_layout_changed; }
|
||||
bool seq_top_layer_only_changed() const { return m_seq_top_layer_only_changed; }
|
||||
bool seq_seq_top_gcode_indices_changed() const { return m_seq_top_gcode_indices_changed; }
|
||||
bool recreate_GUI() const { return m_recreate_GUI; }
|
||||
void build();
|
||||
void accept(wxEvent&);
|
||||
|
Loading…
Reference in New Issue
Block a user