Merge pull request #26781 from YeldhamDev/editfilediag_favdir_fix

Fix "Favorite" button not being toggled when navigating to a faved folder manually
This commit is contained in:
Rémi Verschelde 2019-03-08 08:26:55 +01:00 committed by GitHub
commit a38bf5287a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -852,7 +852,7 @@ void EditorFileDialog::update_file_list() {
fav_down->set_disabled(true); fav_down->set_disabled(true);
get_ok()->set_disabled(_is_open_should_be_disabled()); get_ok()->set_disabled(_is_open_should_be_disabled());
for (int i = 0; i < favorites->get_item_count(); i++) { for (int i = 0; i < favorites->get_item_count(); i++) {
if (favorites->get_item_metadata(i) == cdir) { if (favorites->get_item_metadata(i) == cdir || favorites->get_item_metadata(i) == cdir + "/") {
favorites->select(i); favorites->select(i);
favorite->set_pressed(true); favorite->set_pressed(true);
if (i > 0) { if (i > 0) {