Bug 379433

Summary: Project is automatically selected when a file is saved
Product: [Applications] kdevelop Reporter: Ambroz Bizjak <ambrop7>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: kde, mail, simonandric5
Priority: NOR Keywords: regression
Version: 5.1.1   
Target Milestone: 5.1.2   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D6019
Latest Commit: Version Fixed In: 5.1.2

Description Ambroz Bizjak 2017-05-02 10:11:54 UTC
- In Projects, a single file or folder (but not project) is selected.
- I modify and save a file belonging to this project.
- Result: now also the project is selected, in addition to the file that was selected (two items are selected, as if I ctrl-clicked on the project).

This is quite annoying. For example if I try to right-click on the previously (and still) selected item to use "find and replace", the option will not be there. Similarly if I want to build the project by right-clicking on it and choosing Build, the Build option will be absent.

This is a regression from 5.0.4 to 5.1.0.
Comment 1 Francis Herne 2017-05-27 16:07:53 UTC
Reproducible with 5.1.1.

There has to be exactly one project open, with more projects none are selected in this case.
Comment 2 Francis Herne 2017-05-27 16:53:41 UTC
Reverting c818000 "Fix project tree state not being saved" prevents this.
Comment 3 Kevin Funk 2017-05-29 06:55:52 UTC
Thanks for the investigation Francis.

I'll notify Janek, the author of the patch.
Comment 4 Janek Bevendorff 2017-05-29 17:18:40 UTC
I'll have a look
Comment 5 Janek Bevendorff 2017-05-29 21:50:00 UTC
Please check out this fix: https://phabricator.kde.org/D6019
Comment 6 Kevin Funk 2017-06-05 12:01:21 UTC
Git commit da4c0fdfcf21dc2a8f48a2b1402213a32effd47a by Kevin Funk, on behalf of Janek Bevendorff.
Committed on 05/06/2017 at 12:00.
Pushed by kfunk into branch '5.1'.

Fix selection when only one project is in projects view
FIXED-IN: 5.1.2
Differential Revision: https://phabricator.kde.org/D6019

(cherry picked from commit 10eb177efb28da476e5b948b886a894039085c02)

M  +0    -10   plugins/projectmanagerview/projecttreeview.cpp

https://commits.kde.org/kdevplatform/da4c0fdfcf21dc2a8f48a2b1402213a32effd47a