Commit 8df212fa authored by Daniel Elstner's avatar Daniel Elstner
Browse files

:calculate_file_index): Simplify.

* src/filetree.cc (FileTree::calculate_file_index): Simplify.
parent 3dc195c6
2004-06-03 Daniel Elstner <daniel.elstner@gmx.net>
* src/filetree.cc (FileTree::calculate_file_index): Simplify.
2004-06-02 Daniel Elstner <daniel.elstner@gmx.net>
* src/filebuffer.cc (FileBuffer::create_with_error_message):
......
......@@ -960,18 +960,11 @@ int FileTree::calculate_file_index(const Gtk::TreeModel::iterator& pos)
Gtk::TreeModel::iterator iter = pos->parent();
if (iter) // calculate the parent's index first if there is one
{
index = calculate_file_index(iter); // recurse
iter = iter->children().begin();
}
else // toplevel reached
{
iter = treestore_->children().begin();
}
const FileTreeColumns& columns = FileTreeColumns::instance();
for (; iter != pos; ++iter)
for (iter = iter->children().begin(); iter != pos; ++iter)
{
const FileInfoBasePtr base = (*iter)[columns.fileinfo];
g_return_val_if_fail(base, index);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment