diff options
| author | Greg Ercolano <erco@seriss.com> | 2020-08-10 09:32:06 -0700 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2020-08-10 09:32:06 -0700 |
| commit | cd26829099683fda116c3e1b02d9d30b713b6296 (patch) | |
| tree | ca25a444fe07c5be813b186c0051a36109633f66 /src/Fl_File_Chooser2.cxx | |
| parent | 7b797bf9edf570a89684f44afde86a650cd40ebc (diff) | |
Fix missing Alt-N shortcut for newly created favorites
Fl_File_Chooser's "Add Favorite" function wasn't including the
Alt-N shortcut when initially added. Now just calls update_favorites()
to rebuild the menu with proper shortcut numbering.
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 39010eb8c..c22860c24 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -515,8 +515,7 @@ Fl_File_Chooser::favoritesButtonCB() prefs_->set(menuname, directory_); prefs_->flush(); - quote_pathname(menuname, directory_, sizeof(menuname)); - favoritesButton->add(menuname); + update_favorites(); // adds item to favorites with Alt-n shortcut if (favoritesButton->size() > 104) { ((Fl_Menu_Item *)favoritesButton->menu())[0].deactivate(); |
