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:
authorYuSanka <yusanka@gmail.com>2019-11-21 22:33:15 +0300
committerYuSanka <yusanka@gmail.com>2019-11-22 12:42:30 +0300
commit5bf1c023032056ea134afa42d9e54f9f31d0d117 (patch)
tree39dc9912668db0fa31dc83a825a90df01a03eeea /src/slic3r/GUI/ConfigWizard_private.hpp
parentcb395460c4103ab5da18e8cf52bd097ed96943ff (diff)
Implemented aliase for sla_materials
Diffstat (limited to 'src/slic3r/GUI/ConfigWizard_private.hpp')
-rw-r--r--src/slic3r/GUI/ConfigWizard_private.hpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/slic3r/GUI/ConfigWizard_private.hpp b/src/slic3r/GUI/ConfigWizard_private.hpp
index 500488bc9..3a936fa42 100644
--- a/src/slic3r/GUI/ConfigWizard_private.hpp
+++ b/src/slic3r/GUI/ConfigWizard_private.hpp
@@ -75,8 +75,7 @@ struct Materials
template<class F> void filter_presets(const std::string &type, const std::string &vendor, F cb) {
for (const Preset *preset : presets) {
- if ((type.empty() || get_type(preset) == type) && (vendor.empty() || get_vendor(preset) == vendor)//) {
- && preset->alias.empty()) {
+ if ((type.empty() || get_type(preset) == type) && (vendor.empty() || get_vendor(preset) == vendor)) {
cb(preset);
}
}
@@ -244,7 +243,9 @@ template<class T, class D> struct DataList : public T
};
typedef DataList<wxListBox, std::string> StringList;
-typedef DataList<wxCheckListBox, Preset> PresetList;
+// #ys_FIXME_alias
+//typedef DataList<wxCheckListBox, Preset> PresetList;
+typedef DataList<wxCheckListBox, std::string> PresetList;
struct PageMaterials: ConfigWizardPage
{
@@ -418,7 +419,8 @@ struct ConfigWizard::priv
// PrinterPickers state.
Materials filaments; // Holds available filament presets and their types & vendors
Materials sla_materials; // Ditto for SLA materials
- PresetAliases aliases; // Map of aliase to preset names
+ PresetAliases aliases_fff; // Map of aliase to preset names
+ PresetAliases aliases_sla; // Map of aliase to preset names
std::unique_ptr<DynamicPrintConfig> custom_config; // Backing for custom printer definition
bool any_fff_selected; // Used to decide whether to display Filaments page
bool any_sla_selected; // Used to decide whether to display SLA Materials page
@@ -458,7 +460,6 @@ struct ConfigWizard::priv
: q(q)
, filaments(T_FFF)
, sla_materials(T_SLA)
- , any_sla_selected(false)
{}
void load_pages();
@@ -478,14 +479,11 @@ struct ConfigWizard::priv
void apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater);
// #ys_FIXME_alise
- void add_presets(const std::string& section, const std::string& alias_key);
- void del_presets(const std::string& section, const std::string& alias_key);
+ void update_presets_in_config(const std::string& section, const std::string& alias_key, bool add);
int em() const { return index->em(); }
};
-
-
}
}