Mercurial > hg > octave-nkf
diff libgui/src/files-dock-widget.cc @ 16510:e22604d4bf85
* files-dock-widget.cc(constructor): initial dir is where octave was started
author | Torsten <ttl@justmail.de> |
---|---|
date | Sat, 13 Apr 2013 08:26:56 +0200 |
parents | 14045b872a3d |
children | 87b78e75a2b9 |
line wrap: on
line diff
--- a/libgui/src/files-dock-widget.cc +++ b/libgui/src/files-dock-widget.cc @@ -104,12 +104,12 @@ // TODO: Add other buttons for creating directories - // Create the QFileSystemModel starting in the home directory - QString homePath = QDir::homePath (); - + // Create the QFileSystemModel starting in the actual directory + QDir curr_dir; _file_system_model = new QFileSystemModel (this); _file_system_model->setFilter (QDir::NoDotAndDotDot | QDir::AllEntries); - QModelIndex rootPathIndex = _file_system_model->setRootPath (homePath); + QModelIndex rootPathIndex = _file_system_model->setRootPath ( + curr_dir.absolutePath ()); // Attach the model to the QTreeView and set the root index _file_tree_view = new QTreeView (container);