mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 19:05:53 +08:00
#1083 Make deselectable the automatic switch from tabs during background processing
This commit is contained in:
parent
e9f4a0205b
commit
d0b0bee995
@ -57,6 +57,7 @@ void AppConfig::set_defaults()
|
||||
|
||||
if (get("show_drop_project_dialog").empty())
|
||||
set("show_drop_project_dialog", "1");
|
||||
|
||||
if (get("drop_project_action").empty())
|
||||
set("drop_project_action", "1");
|
||||
|
||||
@ -151,12 +152,21 @@ void AppConfig::set_defaults()
|
||||
if (get("use_custom_toolbar_size").empty())
|
||||
set("use_custom_toolbar_size", "0");
|
||||
|
||||
if (get("show_collapse_button").empty())
|
||||
set("show_collapse_button", "1");
|
||||
|
||||
if (get("suppress_hyperlinks").empty())
|
||||
set("suppress_hyperlinks", "1");
|
||||
|
||||
if (get("custom_toolbar_size").empty())
|
||||
set("custom_toolbar_size", "100");
|
||||
|
||||
if (get("auto_toolbar_size").empty())
|
||||
set("auto_toolbar_size", "100");
|
||||
|
||||
if (get("auto_switch_preview").empty())
|
||||
set("auto_switch_preview", "1");
|
||||
|
||||
#if ENABLE_ENVIRONMENT_MAP
|
||||
if (get("use_environment_map").empty())
|
||||
set("use_environment_map", "0");
|
||||
|
@ -3095,7 +3095,7 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
|
||||
}
|
||||
|
||||
//update tab if needed
|
||||
if (invalidated != Print::ApplyStatus::APPLY_STATUS_UNCHANGED)
|
||||
if (invalidated != Print::ApplyStatus::APPLY_STATUS_UNCHANGED && wxGetApp().app_config->get("auto_switch_preview") == "1")
|
||||
{
|
||||
if (this->preview->can_display_gcode())
|
||||
main_frame->select_tab(MainFrame::ETabType::PlaterGcode, true);
|
||||
@ -3708,7 +3708,8 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
|
||||
void Plater::priv::on_slicing_completed(wxCommandEvent & evt)
|
||||
{
|
||||
notification_manager->push_slicing_complete_notification(evt.GetInt(), is_sidebar_collapsed());
|
||||
main_frame->select_tab(MainFrame::ETabType::PlaterPreview);
|
||||
if(wxGetApp().app_config->get("auto_switch_preview") == "1")
|
||||
main_frame->select_tab(MainFrame::ETabType::PlaterPreview);
|
||||
switch (this->printer_technology) {
|
||||
case ptFFF:
|
||||
this->update_fff_scene();
|
||||
@ -3788,7 +3789,8 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
|
||||
this->background_process.stop();
|
||||
this->statusbar()->reset_cancel_callback();
|
||||
this->statusbar()->stop_busy();
|
||||
main_frame->select_tab(MainFrame::ETabType::PlaterGcode);
|
||||
if (wxGetApp().app_config->get("auto_switch_preview") == "1")
|
||||
main_frame->select_tab(MainFrame::ETabType::PlaterGcode);
|
||||
|
||||
// Reset the "export G-code path" name, so that the automatic background processing will be enabled again.
|
||||
this->background_process.reset_export();
|
||||
|
@ -419,6 +419,15 @@ void PreferencesDialog::build()
|
||||
option.opt.width = 6;
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
|
||||
if (is_editor) {
|
||||
def.label = L("Switch from 3D view to Preview when sliced");
|
||||
def.type = coBool;
|
||||
def.tooltip = std::string(L("When an object is sliced, it will switch your view from the 3D view to the previewx (and then gcode-preview) automatically."));
|
||||
def.set_default_value(new ConfigOptionBool{ app_config->get("auto_switch_preview") == "1" });
|
||||
option = Option(def, "auto_switch_preview");
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
}
|
||||
|
||||
activate_options_tab(m_optgroup_gui);
|
||||
|
||||
if (is_editor) {
|
||||
|
@ -8,10 +8,10 @@ set(SLIC3R_APP_KEY "Slic3r")
|
||||
# exe name of the slicer, should be lowercase and valid in all os
|
||||
set(SLIC3R_APP_CMD "Slic3r")
|
||||
# versions
|
||||
set(SLIC3R_VERSION "2.0")
|
||||
set(SLIC3R_VERSION_FULL "2.0.00.0")
|
||||
set(SLIC3R_VERSION "2.4")
|
||||
set(SLIC3R_VERSION_FULL "2.4.00.0")
|
||||
set(SLIC3R_BUILD_ID "Slic3r_${SLIC3R_VERSION_FULL}")
|
||||
set(SLIC3R_RC_VERSION "2,0,00,0")
|
||||
set(SLIC3R_RC_VERSION "2,4,00,0")
|
||||
set(SLIC3R_RC_VERSION_DOTS "${SLIC3R_VERSION_FULL}")
|
||||
|
||||
# Same as the slicer name but for gcodeviewer
|
||||
|
Loading…
x
Reference in New Issue
Block a user