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
path: root/xs
diff options
context:
space:
mode:
authorVojtech Kral <vojtech@kral.hk>2018-06-19 19:26:38 +0300
committerbubnikv <bubnikv@gmail.com>2018-06-19 19:26:38 +0300
commit478488972c7832c669f7ae7c47360555c95a7e7d (patch)
tree2d4861681ba9e4feb949d5fb2550bbe6bddf2bdb /xs
parent27faaa27f6e647490a1c5e03aa7ef3655cae8aaf (diff)
Updating bugfixes (#973)
* ConfigWizard: Fix MM legacy profile detect * Remove Perl BedShapeDialog * PresetUpdater: Look for updates in resources as well * ConfigWizard: Startup condition based on printer profiles only rather than all profiles Previously wizard would not run if there was a leftover filament profile but no printer profiles * ConfigWizard: Fix button labels * ConfigWizard: Pick the very first printer variant by default
Diffstat (limited to 'xs')
-rw-r--r--xs/src/slic3r/GUI/ConfigWizard.cpp17
-rw-r--r--xs/src/slic3r/GUI/GUI.cpp2
-rw-r--r--xs/src/slic3r/Utils/PresetUpdater.cpp27
3 files changed, 28 insertions, 18 deletions
diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp
index aed0c3534..ce06da853 100644
--- a/xs/src/slic3r/GUI/ConfigWizard.cpp
+++ b/xs/src/slic3r/GUI/ConfigWizard.cpp
@@ -113,6 +113,11 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons
sizer->Add(all_none_sizer, 0, wxEXPAND);
SetSizer(sizer);
+
+ if (cboxes.size() > 0) {
+ cboxes[0]->SetValue(true);
+ on_checkbox(cboxes[0], true);
+ }
}
void PrinterPicker::select_all(bool select)
@@ -598,10 +603,10 @@ void ConfigWizardIndex::on_paint(wxPaintEvent & evt)
static const std::unordered_map<std::string, std::pair<std::string, std::string>> legacy_preset_map {{
{ "Original Prusa i3 MK2.ini", std::make_pair("MK2S", "0.4") },
- { "Original Prusa i3 MK2 MM Single Mode.ini", std::make_pair("MK2S", "0.4") },
- { "Original Prusa i3 MK2 MM Single Mode 0.6 nozzle.ini", std::make_pair("MK2S", "0.6") },
- { "Original Prusa i3 MK2 MultiMaterial.ini", std::make_pair("MK2S", "0.4") },
- { "Original Prusa i3 MK2 MultiMaterial 0.6 nozzle.ini", std::make_pair("MK2S", "0.6") },
+ { "Original Prusa i3 MK2 MM Single Mode.ini", std::make_pair("MK2SMM", "0.4") },
+ { "Original Prusa i3 MK2 MM Single Mode 0.6 nozzle.ini", std::make_pair("MK2SMM", "0.6") },
+ { "Original Prusa i3 MK2 MultiMaterial.ini", std::make_pair("MK2SMM", "0.4") },
+ { "Original Prusa i3 MK2 MultiMaterial 0.6 nozzle.ini", std::make_pair("MK2SMM", "0.6") },
{ "Original Prusa i3 MK2 0.25 nozzle.ini", std::make_pair("MK2S", "0.25") },
{ "Original Prusa i3 MK2 0.6 nozzle.ini", std::make_pair("MK2S", "0.6") },
{ "Original Prusa i3 MK3.ini", std::make_pair("MK3", "0.4") },
@@ -809,8 +814,8 @@ ConfigWizard::ConfigWizard(wxWindow *parent, RunReason reason) :
topsizer->AddSpacer(INDEX_MARGIN);
topsizer->Add(p->hscroll, 1, wxEXPAND);
- p->btn_prev = new wxButton(this, wxID_BACKWARD);
- p->btn_next = new wxButton(this, wxID_FORWARD);
+ p->btn_prev = new wxButton(this, wxID_NONE, _(L("< &Back")));
+ p->btn_next = new wxButton(this, wxID_NONE, _(L("&Next >")));
p->btn_finish = new wxButton(this, wxID_APPLY, _(L("&Finish")));
p->btn_cancel = new wxButton(this, wxID_CANCEL);
p->btnsizer->AddStretchSpacer();
diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp
index 974c554b6..e2f3925fc 100644
--- a/xs/src/slic3r/GUI/GUI.cpp
+++ b/xs/src/slic3r/GUI/GUI.cpp
@@ -423,7 +423,7 @@ bool check_unsaved_changes()
bool config_wizard_startup(bool app_config_exists)
{
- if (! app_config_exists || g_PresetBundle->has_defauls_only()) {
+ if (! app_config_exists || g_PresetBundle->printers.size() <= 1) {
config_wizard(ConfigWizard::RR_DATA_EMPTY);
return true;
} else if (g_AppConfig->legacy_datadir()) {
diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp
index f34fc4c19..8159a75e2 100644
--- a/xs/src/slic3r/Utils/PresetUpdater.cpp
+++ b/xs/src/slic3r/Utils/PresetUpdater.cpp
@@ -259,7 +259,7 @@ void PresetUpdater::priv::sync_config(const std::set<VendorProfile> vendors) con
}
const auto recommended = recommended_it->config_version;
- BOOST_LOG_TRIVIAL(debug) << boost::format("New index for vendor: %1%: current version: %2%, recommended version: %3%")
+ BOOST_LOG_TRIVIAL(debug) << boost::format("Got index for vendor: %1%: current version: %2%, recommended version: %3%")
% vendor.name
% vendor.config_version.to_string()
% recommended.to_string();
@@ -352,20 +352,25 @@ Updates PresetUpdater::priv::get_config_updates() const
continue;
}
- auto path_in_cache = cache_path / (idx.vendor() + ".ini");
- if (! fs::exists(path_in_cache)) {
- BOOST_LOG_TRIVIAL(warning) << "Index indicates update, but new bundle not found in cache: " << path_in_cache.string();
- continue;
+ auto path_src = cache_path / (idx.vendor() + ".ini");
+ if (! fs::exists(path_src)) {
+ auto path_in_rsrc = rsrc_path / (idx.vendor() + ".ini");
+ if (! fs::exists(path_in_rsrc)) {
+ BOOST_LOG_TRIVIAL(warning) << boost::format("Index for vendor %1% indicates update, but bundle found in neither cache nor resources")
+ % idx.vendor();;
+ continue;
+ } else {
+ path_src = std::move(path_in_rsrc);
+ }
}
- const auto cached_vp = VendorProfile::from_ini(path_in_cache, false);
- if (cached_vp.config_version == recommended->config_version) {
- updates.updates.emplace_back(std::move(path_in_cache), std::move(bundle_path), *recommended);
+ const auto new_vp = VendorProfile::from_ini(path_src, false);
+ if (new_vp.config_version == recommended->config_version) {
+ updates.updates.emplace_back(std::move(path_src), std::move(bundle_path), *recommended);
} else {
- BOOST_LOG_TRIVIAL(warning) << boost::format("Vendor: %1%: Index indicates update (%2%) but cached bundle has a different version: %3%")
+ BOOST_LOG_TRIVIAL(warning) << boost::format("Index for vendor %1% indicates update (%2%) but the new bundle was found neither in cache nor resources")
% idx.vendor()
- % recommended->config_version.to_string()
- % cached_vp.config_version.to_string();
+ % recommended->config_version.to_string();
}
}
}