mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-06 00:36:05 +08:00
Fix regression where what should have been the default constructor was used instead for the file load constructor.
This commit is contained in:
parent
569bb43a1a
commit
8059bff31e
@ -10,8 +10,7 @@ using namespace boost;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
Preset::Preset(std::string load_dir, std::string filename, preset_t p) : group(p), _file(wxFileName(load_dir, filename)) {
|
||||
this->name = this->_file.GetName();
|
||||
Preset::Preset(bool is_default, wxString name, preset_t p) : group(p), name(name), external(false), default_preset(is_default) {
|
||||
t_config_option_keys keylist;
|
||||
switch (this->group) {
|
||||
case preset_t::Print:
|
||||
@ -29,6 +28,13 @@ Preset::Preset(std::string load_dir, std::string filename, preset_t p) : group(p
|
||||
this->_config = Slic3r::Config::new_from_defaults(keylist);
|
||||
}
|
||||
|
||||
Preset::Preset(std::string load_dir, std::string filename, preset_t p) : group(p), _file(wxFileName(load_dir, filename)) {
|
||||
this->name = this->_file.GetName();
|
||||
this->_dirty_config = Slic3r::Config::new_from_ini(_file.GetFullPath().ToStdString());
|
||||
this->_config = Slic3r::Config::new_from_ini(_file.GetFullPath().ToStdString());
|
||||
|
||||
}
|
||||
|
||||
t_config_option_keys Preset::dirty_options() const {
|
||||
t_config_option_keys dirty;
|
||||
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
|
||||
/// Constructor for adding a file-backed
|
||||
Preset(std::string load_dir, std::string filename, preset_t p);
|
||||
Preset(bool is_default, wxString name, preset_t p) : group(p), name(name), external(false), default_preset(is_default) {};
|
||||
Preset(bool is_default, wxString name, preset_t p);
|
||||
private:
|
||||
|
||||
/// store to keep config options for this preset
|
||||
|
Loading…
x
Reference in New Issue
Block a user