Kill autocenter

This commit is contained in:
Lukas Matena 2024-12-04 15:48:42 +01:00
parent c4a7134eb6
commit a62e772cfd
4 changed files with 0 additions and 32 deletions

View File

@ -63,9 +63,6 @@ void AppConfig::reset()
void AppConfig::set_defaults() void AppConfig::set_defaults()
{ {
if (m_mode == EAppMode::Editor) { if (m_mode == EAppMode::Editor) {
// Reset the empty fields to defaults.
if (get("autocenter").empty())
set("autocenter", "0");
// Disable background processing by default as it is not stable. // Disable background processing by default as it is not stable.
if (get("background_processing").empty()) if (get("background_processing").empty())
set("background_processing", "0"); set("background_processing", "0");

View File

@ -1533,12 +1533,6 @@ std::pair<PresetsConfigSubstitutions, size_t> PresetBundle::load_configbundle(
if (dst) if (dst)
unescape_strings_cstyle(kvp.second.data(), *dst); unescape_strings_cstyle(kvp.second.data(), *dst);
} }
} else if (section.first == "settings") {
// Load the settings.
for (auto &kvp : section.second) {
if (kvp.first == "autocenter") {
}
}
} else } else
// Ignore an unknown section. // Ignore an unknown section.
continue; continue;
@ -2045,13 +2039,6 @@ void PresetBundle::export_configbundle(const std::string &path, bool export_syst
if (export_physical_printers && this->physical_printers.get_selected_idx() >= 0) if (export_physical_printers && this->physical_printers.get_selected_idx() >= 0)
c << "physical_printer = " << this->physical_printers.get_selected_printer_name() << std::endl; c << "physical_printer = " << this->physical_printers.get_selected_printer_name() << std::endl;
#if 0
// Export the following setting values from the provided setting repository.
static const char *settings_keys[] = { "autocenter" };
c << "[settings]" << std::endl;
for (size_t i = 0; i < sizeof(settings_keys) / sizeof(settings_keys[0]); ++ i)
c << settings_keys[i] << " = " << settings.serialize(settings_keys[i]) << std::endl;
#endif
c.close(); c.close();
} }

View File

@ -1090,11 +1090,6 @@ Plater::priv::~priv()
void Plater::priv::update(unsigned int flags) void Plater::priv::update(unsigned int flags)
{ {
// the following line, when enabled, causes flickering on NVIDIA graphics cards
// wxWindowUpdateLocker freeze_guard(q);
if (get_config_bool("autocenter"))
model.center_instances_around_point(this->bed.build_volume().bed_center());
unsigned int update_status = 0; unsigned int update_status = 0;
const bool force_background_processing_restart = this->printer_technology == ptSLA || (flags & (unsigned int)UpdateParams::FORCE_BACKGROUND_PROCESSING_UPDATE); const bool force_background_processing_restart = this->printer_technology == ptSLA || (flags & (unsigned int)UpdateParams::FORCE_BACKGROUND_PROCESSING_UPDATE);
if (force_background_processing_restart) if (force_background_processing_restart)
@ -1108,9 +1103,6 @@ void Plater::priv::update(unsigned int flags)
this->restart_background_process(update_status); this->restart_background_process(update_status);
else else
this->schedule_background_process(); this->schedule_background_process();
if (get_config_bool("autocenter") && this->sidebar->obj_manipul()->IsShown())
this->sidebar->obj_manipul()->UpdateAndShow(true);
} }
void Plater::priv::select_view(const std::string& direction) void Plater::priv::select_view(const std::string& direction)
@ -5526,9 +5518,6 @@ void Plater::increase_instances(size_t num, int obj_idx, int inst_idx)
model_object->add_instance(trafo); model_object->add_instance(trafo);
} }
if (p->get_config_bool("autocenter"))
arrange();
p->update(); p->update();
p->get_selection().add_instance(obj_idx, (int)model_object->instances.size() - 1); p->get_selection().add_instance(obj_idx, (int)model_object->instances.size() - 1);

View File

@ -301,11 +301,6 @@ void PreferencesDialog::build()
L("If this is enabled, Slic3r will prompt the last output directory instead of the one containing the input files."), L("If this is enabled, Slic3r will prompt the last output directory instead of the one containing the input files."),
app_config->has("remember_output_path") ? app_config->get_bool("remember_output_path") : true); app_config->has("remember_output_path") ? app_config->get_bool("remember_output_path") : true);
append_bool_option(m_optgroup_general, "autocenter",
L("Auto-center parts"),
L("If this is enabled, Slic3r will auto-center objects around the print bed center."),
app_config->get_bool("autocenter"));
append_bool_option(m_optgroup_general, "background_processing", append_bool_option(m_optgroup_general, "background_processing",
L("Background processing"), L("Background processing"),
L("If this is enabled, Slic3r will pre-process objects as soon " L("If this is enabled, Slic3r will pre-process objects as soon "