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:
authorbubnikv <bubnikv@gmail.com>2018-04-17 11:38:02 +0300
committerbubnikv <bubnikv@gmail.com>2018-04-17 11:38:02 +0300
commit3b0eb6b786e8c20e255a69be6fe1a0474402f68c (patch)
tree01af987648ae017096badfc3299c38bcad64d2a6 /xs/src/slic3r/GUI/Tab.cpp
parentc18b28e27ca4acf68482f981620632d86b1ac356 (diff)
parent37cf839b2779bb5f14b0cdf7a408956e580e80cd (diff)
Merge remote-tracking branch 'origin/updating' into cpp_ui_optimization
Diffstat (limited to 'xs/src/slic3r/GUI/Tab.cpp')
-rw-r--r--xs/src/slic3r/GUI/Tab.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp
index f2511708b..851022489 100644
--- a/xs/src/slic3r/GUI/Tab.cpp
+++ b/xs/src/slic3r/GUI/Tab.cpp
@@ -644,7 +644,8 @@ void Tab::load_key_value(const std::string& opt_key, const boost::any& value)
change_opt_value(*m_config, opt_key, value);
// Mark the print & filament enabled if they are compatible with the currently selected preset.
if (opt_key.compare("compatible_printers") == 0) {
- m_preset_bundle->update_compatible_with_printer(0);
+ // Don't select another profile if this profile happens to become incompatible.
+ m_preset_bundle->update_compatible_with_printer(false);
}
m_presets->update_dirty_ui(m_presets_choice);
on_presets_changed();
@@ -2203,9 +2204,9 @@ wxSizer* Tab::compatible_printers_widget(wxWindow* parent, wxCheckBox** checkbox
presets.Add(preset.name);
}
- auto dlg = new wxMultiChoiceDialog(parent,
- _(L("Select the printers this profile is compatible with.")),
- _(L("Compatible printers")), presets);
+ wxMultiChoiceDialog dlg(parent,
+ _(L("Select the printers this profile is compatible with.")),
+ _(L("Compatible printers")), presets);
// # Collect and set indices of printers marked as compatible.
wxArrayInt selections;
auto *compatible_printers = dynamic_cast<const ConfigOptionStrings*>(m_config->option("compatible_printers"));
@@ -2217,12 +2218,12 @@ wxSizer* Tab::compatible_printers_widget(wxWindow* parent, wxCheckBox** checkbox
selections.Add(idx);
break;
}
- dlg->SetSelections(selections);
+ dlg.SetSelections(selections);
std::vector<std::string> value;
// Show the dialog.
- if (dlg->ShowModal() == wxID_OK) {
+ if (dlg.ShowModal() == wxID_OK) {
selections.Clear();
- selections = dlg->GetSelections();
+ selections = dlg.GetSelections();
for (auto idx : selections)
value.push_back(presets[idx].ToStdString());
if (value.empty()) {