Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2018-07-17 09:54:17 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-07-17 09:54:17 +0300
commit8175c9d306b6e738788cd79334173b5f9b161662 (patch)
tree6aaaa43980d3fc3344b911defe4eb7a7b9908f53 /lib/Slic3r/GUI
parenta80ef7201b4a782378aef75789fd0fb2b4f09b93 (diff)
parent210eeff1602e2ab6cb465278db1bd5fc34eb28ef (diff)
Merge with master
Diffstat (limited to 'lib/Slic3r/GUI')
-rw-r--r--lib/Slic3r/GUI/MainFrame.pm17
-rw-r--r--lib/Slic3r/GUI/Plater.pm11
2 files changed, 24 insertions, 4 deletions
diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm
index ea4a158f4..77d7956c9 100644
--- a/lib/Slic3r/GUI/MainFrame.pm
+++ b/lib/Slic3r/GUI/MainFrame.pm
@@ -19,6 +19,7 @@ use Wx::Locale gettext => 'L';
our $qs_last_input_file;
our $qs_last_output_file;
our $last_config;
+our $appController;
# Events to be sent from a C++ Tab implementation:
# 1) To inform about a change of a configuration value.
@@ -31,6 +32,9 @@ sub new {
my $self = $class->SUPER::new(undef, -1, $Slic3r::FORK_NAME . ' - ' . $Slic3r::VERSION, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE);
Slic3r::GUI::set_main_frame($self);
+
+ $appController = Slic3r::AppController->new();
+
if ($^O eq 'MSWin32') {
# Load the icon either from the exe, or from the ico file.
my $iconfile = Slic3r::decode_path($FindBin::Bin) . '\slic3r.exe';
@@ -58,10 +62,21 @@ sub new {
eval { Wx::ToolTip::SetAutoPop(32767) };
# initialize status bar
- $self->{statusbar} = Slic3r::GUI::ProgressStatusBar->new($self, -1);
+ $self->{statusbar} = Slic3r::GUI::ProgressStatusBar->new($self, Wx::NewId);
$self->{statusbar}->SetStatusText(L("Version ").$Slic3r::VERSION.L(" - Remember to check for updates at http://github.com/prusa3d/slic3r/releases"));
$self->SetStatusBar($self->{statusbar});
+ # Make the global status bar and its progress indicator available in C++
+ $appController->set_global_progress_indicator(
+ $self->{statusbar}->{prog}->GetId(),
+ $self->{statusbar}->GetId(),
+ );
+
+ $appController->set_model($self->{plater}->{model});
+ $appController->set_print($self->{plater}->{print});
+
+ $self->{plater}->{appController} = $appController;
+
$self->{loaded} = 1;
# initialize layout
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm
index 528018ebb..73f0e14cb 100644
--- a/lib/Slic3r/GUI/Plater.pm
+++ b/lib/Slic3r/GUI/Plater.pm
@@ -45,6 +45,7 @@ use constant FILAMENT_CHOOSERS_SPACING => 0;
use constant PROCESS_DELAY => 0.5 * 1000; # milliseconds
my $PreventListEvents = 0;
+our $appController;
sub new {
my ($class, $parent) = @_;
@@ -1192,13 +1193,17 @@ sub arrange {
$self->pause_background_process;
- my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape);
- my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb);
+ # my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape);
+ # my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb);
+
+ # Update is not implemented in C++ so we cannot call this for now
+ $self->{appController}->arrange_model;
+
# ignore arrange failures on purpose: user has visual feedback and we don't need to warn him
# when parts don't fit in print bed
# Force auto center of the aligned grid of of objects on the print bed.
- $self->update(1);
+ $self->update(0);
}
sub split_object {