Merge branch 'master' of https://github.com/prusa3d/Slic3r into scene_manipulators

This commit is contained in:
Enrico Turri 2018-05-17 14:43:27 +02:00
commit 7ca9f46b9c
3 changed files with 16 additions and 7 deletions

View File

@ -191,7 +191,7 @@ sub _init_menubar {
# File menu # File menu
my $fileMenu = Wx::Menu->new; my $fileMenu = Wx::Menu->new;
{ {
wxTheApp->append_menu_item($fileMenu, L("Open STL/OBJ/AMF…\tCtrl+O"), L('Open a model'), sub { wxTheApp->append_menu_item($fileMenu, L("Open STL/OBJ/AMF/3MF…\tCtrl+O"), L('Open a model'), sub {
$self->{plater}->add if $self->{plater}; $self->{plater}->add if $self->{plater};
}, undef, undef); #'brick_add.png'); }, undef, undef); #'brick_add.png');
$self->_append_menu_item($fileMenu, L("&Load Config…\tCtrl+L"), L('Load exported configuration file'), sub { $self->_append_menu_item($fileMenu, L("&Load Config…\tCtrl+L"), L('Load exported configuration file'), sub {

View File

@ -1911,8 +1911,10 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
std::ostringstream oss; std::ostringstream oss;
oss << "0x0," << p.value.x << "x0," << p.value.x << "x" << p.value.y << ",0x" << p.value.y; oss << "0x0," << p.value.x << "x0," << p.value.x << "x" << p.value.y << ",0x" << p.value.y;
value = oss.str(); value = oss.str();
} else if (opt_key == "octoprint_host" && !value.empty()) { // Maybe one day we will rename octoprint_host to print_host as it has been done in the upstream Slic3r.
opt_key = "print_host"; // Commenting this out fixes github issue #869 for now.
// } else if (opt_key == "octoprint_host" && !value.empty()) {
// opt_key = "print_host";
} else if ((opt_key == "perimeter_acceleration" && value == "25") } else if ((opt_key == "perimeter_acceleration" && value == "25")
|| (opt_key == "infill_acceleration" && value == "50")) { || (opt_key == "infill_acceleration" && value == "50")) {
/* For historical reasons, the world's full of configs having these very low values; /* For historical reasons, the world's full of configs having these very low values;
@ -1923,10 +1925,6 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
} else if (opt_key == "support_material_pattern" && value == "pillars") { } else if (opt_key == "support_material_pattern" && value == "pillars") {
// Slic3r PE does not support the pillars. They never worked well. // Slic3r PE does not support the pillars. They never worked well.
value = "rectilinear"; value = "rectilinear";
} else if (opt_key == "support_material_threshold" && value == "0") {
// 0 used to be automatic threshold, but we introduced percent values so let's
// transform it into the default value
value = "60%";
} }
// Ignore the following obsolete configuration keys: // Ignore the following obsolete configuration keys:

View File

@ -409,6 +409,17 @@ void PresetUpdater::priv::perform_updates(Updates &&updates, bool snapshot) cons
for (const auto &preset : bundle.prints) { preset_remover(preset); } for (const auto &preset : bundle.prints) { preset_remover(preset); }
for (const auto &preset : bundle.filaments) { preset_remover(preset); } for (const auto &preset : bundle.filaments) { preset_remover(preset); }
for (const auto &preset : bundle.printers) { preset_remover(preset); } for (const auto &preset : bundle.printers) { preset_remover(preset); }
// Also apply the `obsolete_presets` property, removing obsolete ini files
auto obsolete_remover = [](const char *subdir, const std::string &preset) {
auto path = fs::path(Slic3r::data_dir()) / subdir / preset;
path += ".ini";
fs::remove(path);
};
for (const auto &name : bundle.obsolete_presets.prints) { obsolete_remover("print", name); }
for (const auto &name : bundle.obsolete_presets.filaments) { obsolete_remover("filament", name); }
for (const auto &name : bundle.obsolete_presets.printers) { obsolete_remover("printer", name); }
} }
} }
} }