Made Preset methods public (as originally intended), added == for wxString and std::string to let std::find behave nicely.

This commit is contained in:
Joseph Lenox 2018-06-13 22:08:22 -05:00
parent 97acd95341
commit 9d9781acd5

View File

@ -21,6 +21,7 @@ class Preset;
using Presets = std::vector<Preset>; using Presets = std::vector<Preset>;
class Preset { class Preset {
public:
preset_t group; preset_t group;
std::string name {""}; std::string name {""};
@ -62,6 +63,11 @@ class Preset {
/// Clear the dirty config. /// Clear the dirty config.
void dismiss_changes(); void dismiss_changes();
void apply_dirty(const Slic3r::Config& other) { this->dirty_config.apply(other); }
void apply_dirty(const config_ptr& other) { this->apply_dirty(*other); }
bool operator==(const wxString& _name) const { return this->operator==(_name.ToStdString()); }
bool operator==(const std::string& _name) const { return _name.compare(this->name) == 0; }
private: private:
bool external {false}; bool external {false};