From 3a711689b1dd9f97b50bc5bf4fc47323fd7c8848 Mon Sep 17 00:00:00 2001 From: ffsup2 Date: Mon, 10 May 2010 23:58:10 +0200 Subject: [PATCH] Does not select last opened directory on startup expandSuccess is false if directory do not have subdirs --- rtgui/dirbrowser.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 18e60040a..905b9b545 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -341,13 +341,10 @@ void DirBrowser::open (const Glib::ustring& dirname, const Glib::ustring& fileNa Glib::ustring absDirPath = Gio::File::create_for_path(dirname)->get_parse_name (); Gtk::TreePath path = expandToDir (absDirPath); - - if (expandSuccess) { - dirtree->scroll_to_row (path); - dirtree->get_selection()->select (path); - for (int i=0; idirSelected (absDirPath, Glib::build_filename (absDirPath, fileName)); - } + dirtree->scroll_to_row (path); + dirtree->get_selection()->select (path); + for (int i=0; idirSelected (absDirPath, Glib::build_filename (absDirPath, fileName)); } void DirBrowser::file_changed (const Glib::RefPtr& file, const Glib::RefPtr& other_file, Gio::FileMonitorEvent event_type, const Gtk::TreeModel::iterator& iter, const Glib::ustring& dirName) {