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:
authorLukas Matena <lukasmatena@seznam.cz>2018-08-24 17:52:06 +0300
committerLukas Matena <lukasmatena@seznam.cz>2018-08-24 17:52:06 +0300
commita4176ef9338e7a1984fd983661351275c7ff19f1 (patch)
tree9f616ea16255f2ba16554bad8a5a17f51fa1cd78 /lib/Slic3r/GUI
parent60a0375ff99ae2d7608006ebda19d41bcf517b86 (diff)
Bugfix - dialog that changes number of copies deleted the object when cancelled
Diffstat (limited to 'lib/Slic3r/GUI')
-rw-r--r--lib/Slic3r/GUI/Plater.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm
index dbdf0be27..cae167f28 100644
--- a/lib/Slic3r/GUI/Plater.pm
+++ b/lib/Slic3r/GUI/Plater.pm
@@ -995,9 +995,10 @@ sub set_number_of_copies {
my $model_object = $self->{model}->objects->[$obj_idx];
# prompt user
- my $copies = Wx::GetNumberFromUser("", L("Enter the number of copies of the selected object:"), L("Copies"), $model_object->instances_count, 0, 1000, $self);
+ my $copies = -1;
+ $copies = Wx::GetNumberFromUser("", L("Enter the number of copies of the selected object:"), L("Copies"), $model_object->instances_count, 0, 1000, $self);
my $diff = $copies - $model_object->instances_count;
- if ($diff == 0) {
+ if ($diff == 0 || $copies == -1) {
# no variation
$self->resume_background_process;
} elsif ($diff > 0) {