Expand directories without subdirectories as well
This lets the triangle disappear to indicate an expanded state with no subdirectories.
This commit is contained in:
parent
37deb083c5
commit
3020f7dba4
@ -293,9 +293,6 @@ void DirBrowser::row_expanded (const Gtk::TreeModel::iterator& iter, const Gtk::
|
|||||||
auto dir = Gio::File::create_for_path (iter->get_value (dtColumns.dirname));
|
auto dir = Gio::File::create_for_path (iter->get_value (dtColumns.dirname));
|
||||||
auto subDirs = listSubDirs (dir, options.fbShowHidden);
|
auto subDirs = listSubDirs (dir, options.fbShowHidden);
|
||||||
|
|
||||||
if (subDirs.empty()) {
|
|
||||||
dirtree->collapse_row(path);
|
|
||||||
} else {
|
|
||||||
Gtk::TreeNodeChildren children = iter->children();
|
Gtk::TreeNodeChildren children = iter->children();
|
||||||
std::list<Gtk::TreeIter> forErase(children.begin(), children.end());
|
std::list<Gtk::TreeIter> forErase(children.begin(), children.end());
|
||||||
|
|
||||||
@ -321,7 +318,6 @@ void DirBrowser::row_expanded (const Gtk::TreeModel::iterator& iter, const Gtk::
|
|||||||
dirTreeModel->set_sort_column(prevSortColumn, prevSortType);
|
dirTreeModel->set_sort_column(prevSortColumn, prevSortType);
|
||||||
|
|
||||||
expandSuccess = true;
|
expandSuccess = true;
|
||||||
}
|
|
||||||
|
|
||||||
Glib::RefPtr<Gio::FileMonitor> monitor = dir->monitor_directory ();
|
Glib::RefPtr<Gio::FileMonitor> monitor = dir->monitor_directory ();
|
||||||
iter->set_value (dtColumns.monitor, monitor);
|
iter->set_value (dtColumns.monitor, monitor);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user