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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/slic3r/GUI/Plater.cpp')
-rw-r--r--src/slic3r/GUI/Plater.cpp66
1 files changed, 35 insertions, 31 deletions
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 0485b0075..b3ec46425 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -223,6 +223,9 @@ ObjectInfo::ObjectInfo(wxWindow *parent) :
Add(sizer_manifold, 0, wxEXPAND | wxTOP, 4);
sla_hidden_items = { label_volume, info_volume, /*label_materials, info_materials*/ };
+
+ // Fixes layout issues on plater, short BitmapComboBoxes with some Windows scaling, see GH issue #7414.
+ this->Show(false);
}
void ObjectInfo::show_sizer(bool show)
@@ -3648,12 +3651,12 @@ void Plater::priv::reload_from_disk()
if (has_source || has_name) {
int new_volume_idx = -1;
int new_object_idx = -1;
- if (has_source) {
- // take idxs from source
- new_volume_idx = old_volume->source.volume_idx;
- new_object_idx = old_volume->source.object_idx;
- }
- else {
+// if (has_source) {
+// // take idxs from source
+// new_volume_idx = old_volume->source.volume_idx;
+// new_object_idx = old_volume->source.object_idx;
+// }
+// else {
// take idxs from the 1st matching volume
for (size_t o = 0; o < new_model.objects.size(); ++o) {
ModelObject* obj = new_model.objects[o];
@@ -3669,39 +3672,40 @@ void Plater::priv::reload_from_disk()
if (found)
break;
}
- }
+// }
- if (new_object_idx < 0 && (int)new_model.objects.size() <= new_object_idx) {
+ if (new_object_idx < 0 || int(new_model.objects.size()) <= new_object_idx) {
fail_list.push_back(from_u8(has_source ? old_volume->source.input_file : old_volume->name));
continue;
}
ModelObject* new_model_object = new_model.objects[new_object_idx];
- if (new_volume_idx < 0 && (int)new_model.objects.size() <= new_volume_idx) {
+ if (new_volume_idx < 0 || int(new_model_object->volumes.size()) <= new_volume_idx) {
fail_list.push_back(from_u8(has_source ? old_volume->source.input_file : old_volume->name));
continue;
}
- if (new_volume_idx < (int)new_model_object->volumes.size()) {
- old_model_object->add_volume(*new_model_object->volumes[new_volume_idx]);
- ModelVolume* new_volume = old_model_object->volumes.back();
- new_volume->set_new_unique_id();
- new_volume->config.apply(old_volume->config);
- new_volume->set_type(old_volume->type());
- new_volume->set_material_id(old_volume->material_id());
- new_volume->set_transformation(old_volume->get_transformation());
- new_volume->translate(new_volume->get_transformation().get_matrix(true) * (new_volume->source.mesh_offset - old_volume->source.mesh_offset));
- assert(! old_volume->source.is_converted_from_inches || ! old_volume->source.is_converted_from_meters);
- if (old_volume->source.is_converted_from_inches)
- new_volume->convert_from_imperial_units();
- else if (old_volume->source.is_converted_from_meters)
- new_volume->convert_from_meters();
- std::swap(old_model_object->volumes[sel_v.volume_idx], old_model_object->volumes.back());
- old_model_object->delete_volume(old_model_object->volumes.size() - 1);
- if (!sinking)
- old_model_object->ensure_on_bed();
- old_model_object->sort_volumes(wxGetApp().app_config->get("order_volumes") == "1");
-
- sla::reproject_points_and_holes(old_model_object);
- }
+
+ old_model_object->add_volume(*new_model_object->volumes[new_volume_idx]);
+ ModelVolume* new_volume = old_model_object->volumes.back();
+ new_volume->set_new_unique_id();
+ new_volume->config.apply(old_volume->config);
+ new_volume->set_type(old_volume->type());
+ new_volume->set_material_id(old_volume->material_id());
+ new_volume->set_transformation(old_volume->get_transformation());
+ new_volume->translate(new_volume->get_transformation().get_matrix(true) * (new_volume->source.mesh_offset - old_volume->source.mesh_offset));
+ new_volume->source.object_idx = old_volume->source.object_idx;
+ new_volume->source.volume_idx = old_volume->source.volume_idx;
+ assert(! old_volume->source.is_converted_from_inches || ! old_volume->source.is_converted_from_meters);
+ if (old_volume->source.is_converted_from_inches)
+ new_volume->convert_from_imperial_units();
+ else if (old_volume->source.is_converted_from_meters)
+ new_volume->convert_from_meters();
+ std::swap(old_model_object->volumes[sel_v.volume_idx], old_model_object->volumes.back());
+ old_model_object->delete_volume(old_model_object->volumes.size() - 1);
+ if (!sinking)
+ old_model_object->ensure_on_bed();
+ old_model_object->sort_volumes(wxGetApp().app_config->get("order_volumes") == "1");
+
+ sla::reproject_points_and_holes(old_model_object);
}
}
}