mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-03 22:40:37 +08:00
more work on arrange()
This commit is contained in:
parent
b8c8571c39
commit
bbcdebf5b5
@ -374,14 +374,18 @@ void Plater::refresh_canvases() {
|
||||
|
||||
void Plater::arrange() {
|
||||
// pause background process
|
||||
Slic3r::Log::info(LogChannel, L"Called arrange()");
|
||||
auto bb {Slic3r::BoundingBoxf(this->config->get<ConfigOptionPoints>("bed_shape").values)};
|
||||
bool success {this->model->arrange_objects(this->config->min_object_distance(), &bb)};
|
||||
bool success {this->model->arrange_objects(5, &bb)};
|
||||
|
||||
GetFrame()->statusbar->SetStatusText(_("Objects were arranged."));
|
||||
this->on_model_change(true);
|
||||
}
|
||||
|
||||
void Plater::on_model_change(bool force_autocenter) {
|
||||
if (force_autocenter || settings->autocenter) {
|
||||
this->model->center_instances_around_point(this->bed_centerf());
|
||||
}
|
||||
this->refresh_canvases();
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,9 @@ class Plater : public wxPanel
|
||||
public:
|
||||
Plater(wxWindow* parent, const wxString& title, std::shared_ptr<Settings> _settings);
|
||||
void add();
|
||||
|
||||
/// Arrange models
|
||||
void arrange();
|
||||
|
||||
/// Ask if there are any unsaved changes.
|
||||
bool prompt_unsaved_changes() { return true; }
|
||||
@ -96,8 +99,6 @@ private:
|
||||
void on_thumbnail_made(size_t idx);
|
||||
void refresh_canvases();
|
||||
|
||||
/// Arrange models
|
||||
void arrange();
|
||||
|
||||
/// Run everything that needs to happen when models change.
|
||||
/// Includes updating canvases, reloading menus, etc.
|
||||
|
Loading…
x
Reference in New Issue
Block a user