Skip to content

Commit

Permalink
Auto arrange plate after cloning (#6009)
Browse files Browse the repository at this point in the history
* Auto arrange plate after cloning
  • Loading branch information
vovodroid authored Jul 11, 2024
1 parent 230a4aa commit 45224ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libslic3r/AppConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ void AppConfig::set_defaults()
set_bool("show_splash_screen", true);
}

if(get("auto_arrange").empty()) {
set_bool("auto_arrange", true);
}

if (get("show_model_mesh").empty()) {
set_bool("show_model_mesh", false);
}
Expand Down
2 changes: 2 additions & 0 deletions src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13260,6 +13260,8 @@ void Plater::clone_selection()
}
Selection& selection = p->get_selection();
selection.clone(res);
if (wxGetApp().app_config->get("auto_arrange") == "true")
this->arrange();
}

std::vector<Vec2f> Plater::get_empty_cells(const Vec2f step)
Expand Down
2 changes: 2 additions & 0 deletions src/slic3r/GUI/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ wxWindow* PreferencesDialog::create_general_page()
auto item_calc_in_long_retract = create_item_checkbox(_L("Flushing volumes: Auto-calculate every time when the filament is changed."), page, _L("If enabled, auto-calculate every time when filament is changed"), 50, "auto_calculate_when_filament_change");
auto item_remember_printer_config = create_item_checkbox(_L("Remember printer configuration"), page, _L("If enabled, Orca will remember and switch filament/process configuration for each printer automatically."), 50, "remember_printer_config");
auto item_multi_machine = create_item_checkbox(_L("Multi-device Management(Take effect after restarting Orca)."), page, _L("With this option enabled, you can send a task to multiple devices at the same time and manage multiple devices."), 50, "enable_multi_machine");
auto item_auto_arrange = create_item_checkbox(_L("Auto arrange plate after cloning"), page, _L("Auto arrange plate after object cloning"), 50, "auto_arrange");
auto title_presets = create_item_title(_L("Presets"), page, _L("Presets"));
auto title_network = create_item_title(_L("Network"), page, _L("Network"));
auto item_user_sync = create_item_checkbox(_L("Auto sync user presets(Printer/Filament/Process)"), page, _L("User Sync"), 50, "sync_user_preset");
Expand Down Expand Up @@ -1205,6 +1206,7 @@ wxWindow* PreferencesDialog::create_general_page()
sizer_page->Add(item_hints, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_calc_in_long_retract, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_multi_machine, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_auto_arrange, 0, wxTOP, FromDIP(3));
sizer_page->Add(title_presets, 0, wxTOP | wxEXPAND, FromDIP(20));
sizer_page->Add(item_calc_mode, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_user_sync, 0, wxTOP, FromDIP(3));
Expand Down

0 comments on commit 45224ee

Please sign in to comment.