Prechádzať zdrojové kódy

Fix "Favorite" button not being toggled when navigating to a faved folder manually

Michael Alexsander Silva Dias 6 rokov pred
rodič
commit
ec1c879746
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      editor/editor_file_dialog.cpp

+ 1 - 1
editor/editor_file_dialog.cpp

@@ -852,7 +852,7 @@ void EditorFileDialog::update_file_list() {
 	fav_down->set_disabled(true);
 	get_ok()->set_disabled(_is_open_should_be_disabled());
 	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);
 			favorite->set_pressed(true);
 			if (i > 0) {