Bug 180289 - Tree view in open/save dialog: click on a file inside a directory only brings to that directory
Summary: Tree view in open/save dialog: click on a file inside a directory only brings...
Status: CONFIRMED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-10 21:55 UTC by Grósz Dániel
Modified: 2009-06-21 16:19 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grósz Dániel 2009-01-10 21:55:15 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Use Tree view or Detailed tree view in the open/save dialogs. In some applications (including Okular, KolourPaint, KWord) if you open a directory in the tree (by the + sign, so that the content of the parent directory remains there), and click on a file in the subdirectory with any mouse button, when you press the button, the dialog goes to the subdirectory which contains the file, and the file is not selected. So you have to click again to select it.
In some apps (incl. KWrite and Kate) the open dialog works as expected (does not change the actual directory, inserts relative path to the selected file in the Name line), but the described strange behavior still occurs in the save dialog.
Comment 1 Dario Andres 2009-06-21 14:50:19 UTC
Here using:

Qt: 4.5.1 (qt-copy  971295)
KDE: 4.2.92 (KDE 4.2.92 (KDE 4.3 >= 20090617))
kdelibs svn rev. 984425 / kdebase svn rev. 984427
on ArchLinux i686 - Kernel 2.6.29.4

I can confirm the described behaviour in the save dialog of KWrite.
Comment 2 Dario Andres 2009-06-21 16:06:34 UTC
Indeed, it seems the treeView case wasn't properly considered:

"void KFileWidgetPrivate::setLocationText(const KUrl& url)" with a non-dir url sets the directory if that url contains it.
So when you click an item inside an expanded folder in the treeview, setLocationText("dir/file") is called, and the file part is stripped.

Also, void KDirOperator::setUrl(const KUrl& _newurl, bool clearforward) does this.
Someone with more knowledge about this could fix it
Comment 3 Grósz Dániel 2009-06-21 16:19:07 UTC
An additional observation: it seems to me that the problem occurs in the file dialogs where only one file can be selected and not when several files can be selected.