From cd26829099683fda116c3e1b02d9d30b713b6296 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 10 Aug 2020 09:32:06 -0700 Subject: 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. --- src/Fl_File_Chooser2.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3