mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 02:29:03 +08:00
fix typo; assert load sizes
This commit is contained in:
parent
9306c25db2
commit
c8662bad0a
@ -72,8 +72,9 @@ void PresetChooser::load(std::array<Presets, preset_types> presets) {
|
|||||||
size_t i {0};
|
size_t i {0};
|
||||||
std::vector<std::string> preset_names {};
|
std::vector<std::string> preset_names {};
|
||||||
// populate the chooser
|
// populate the chooser
|
||||||
for (auto* chooser : this->preset_choosers[get_preset(group)]) {
|
for (auto* chooser : this->preset_choosers[get_preset(group)]) {
|
||||||
chooser->Clear();
|
chooser->Clear();
|
||||||
|
assert(chooser->GetCount() == 0);
|
||||||
for (auto preset : current_list) {
|
for (auto preset : current_list) {
|
||||||
wxBitmap bitmap;
|
wxBitmap bitmap;
|
||||||
switch (group) {
|
switch (group) {
|
||||||
@ -96,6 +97,8 @@ void PresetChooser::load(std::array<Presets, preset_types> presets) {
|
|||||||
chooser->Append(preset.name, bitmap);
|
chooser->Append(preset.name, bitmap);
|
||||||
__chooser_names[get_preset(group)].push_back(preset.name);
|
__chooser_names[get_preset(group)].push_back(preset.name);
|
||||||
}
|
}
|
||||||
|
assert(chooser->GetCount() == current_list.size());
|
||||||
|
|
||||||
// Apply default options from settings
|
// Apply default options from settings
|
||||||
bool updated_from_settings = false;
|
bool updated_from_settings = false;
|
||||||
if (settings_defaults.size() > i) { // only apply if there is a value from Settings
|
if (settings_defaults.size() > i) { // only apply if there is a value from Settings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user