file dialog: add user bookmarks to correct category (fixes #9298)
This commit is contained in:
parent
7065ed9fde
commit
346c7c38b3
2 changed files with 5 additions and 3 deletions
|
@ -150,8 +150,10 @@ inline std::string pretty_path(const std::string& path)
|
|||
|
||||
inline config get_bookmarks_config()
|
||||
{
|
||||
auto cfg = prefs::get().dir_bookmarks();
|
||||
return cfg ? *cfg : config{};
|
||||
const auto& cfg = prefs::get().dir_bookmarks();
|
||||
return cfg.has_value() ? cfg.value() : config();
|
||||
|
||||
// return cfg ? *cfg : config{};
|
||||
}
|
||||
|
||||
inline void commit_bookmarks_config(config& cfg)
|
||||
|
|
|
@ -819,7 +819,6 @@ class prefs
|
|||
static constexpr std::array unsynced_attributes_{
|
||||
prefs_list::auto_pixel_scale,
|
||||
prefs_list::core,
|
||||
prefs_list::dir_bookmarks,
|
||||
prefs_list::draw_delay,
|
||||
prefs_list::editor_chosen_addon,
|
||||
prefs_list::gui2_theme,
|
||||
|
@ -841,6 +840,7 @@ class prefs
|
|||
};
|
||||
static constexpr std::array unsynced_children_{
|
||||
prefs_list::editor_recent_files,
|
||||
prefs_list::dir_bookmarks,
|
||||
};
|
||||
static_assert(synced_attributes_.size() + synced_children_.size() + unsynced_attributes_.size() + unsynced_children_.size() == prefs_list::values.size(), "attribute missing from lists of synced or unsynced preferences!");
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue