Small code refactoring.
DiffPresetDlg: Rename save() to is_save_confirmed().
This commit is contained in:
parent
84f651f85d
commit
429b65dba3
2 changed files with 3 additions and 3 deletions
|
@ -2010,7 +2010,7 @@ void DiffPresetDialog::update_compatibility(const std::string& preset_name, Pres
|
|||
}
|
||||
}
|
||||
|
||||
bool DiffPresetDialog::save()
|
||||
bool DiffPresetDialog::is_save_confirmed()
|
||||
{
|
||||
presets_to_save.clear();
|
||||
|
||||
|
@ -2056,7 +2056,7 @@ std::vector<std::string> DiffPresetDialog::get_options_to_save(Preset::Type type
|
|||
void DiffPresetDialog::button_event(Action act)
|
||||
{
|
||||
if (act == Action::Save) {
|
||||
if (save()) {
|
||||
if (is_save_confirmed()) {
|
||||
size_t saved_cnt = 0;
|
||||
for (const auto& preset : presets_to_save)
|
||||
if (wxGetApp().preset_bundle->transfer_and_save(preset.type, preset.from_name, preset.to_name, preset.new_name, get_options_to_save(preset.type)))
|
||||
|
|
|
@ -379,7 +379,7 @@ class DiffPresetDialog : public DPIDialog
|
|||
|
||||
std::vector<std::string> get_options_to_save(Preset::Type type);
|
||||
void button_event(Action act);
|
||||
bool save();
|
||||
bool is_save_confirmed();
|
||||
|
||||
struct DiffPresets
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue