mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-04 20:36:31 +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 {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
Preset::Preset(std::string load_dir, std::string filename, preset_t p) : group(p), _file(wxFileName(load_dir, filename)) {
|
Preset::Preset(bool is_default, wxString name, preset_t p) : group(p), name(name), external(false), default_preset(is_default) {
|
||||||
this->name = this->_file.GetName();
|
|
||||||
t_config_option_keys keylist;
|
t_config_option_keys keylist;
|
||||||
switch (this->group) {
|
switch (this->group) {
|
||||||
case preset_t::Print:
|
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);
|
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 Preset::dirty_options() const {
|
||||||
t_config_option_keys dirty;
|
t_config_option_keys dirty;
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public:
|
|||||||
|
|
||||||
/// Constructor for adding a file-backed
|
/// Constructor for adding a file-backed
|
||||||
Preset(std::string load_dir, std::string filename, preset_t p);
|
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:
|
private:
|
||||||
|
|
||||||
/// store to keep config options for this preset
|
/// store to keep config options for this preset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user