Bug 432296

Summary: Projects panel is open but empty in a new session if it was left open in the previous session
Product: [Applications] kate Reporter: Noah Davis <noahadvs>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Empty Projects panel on startup

Description Noah Davis 2021-01-30 04:27:02 UTC
Created attachment 135297 [details]
Empty Projects panel on startup

SUMMARY
If the Projects panel was left open in the previous session and you start a new session, the Projects panel will be open, but empty. This uses up a lot of space, but doesn't have anything useful.

STEPS TO REPRODUCE
1. Open Kate
2. Open the Projects panel (will also be empty if there is no current project)
3. Close Kate
4. Open Kate again

OBSERVED RESULT
The projects panel is open and empty

EXPECTED RESULT

- Don't open the Project panel in a new session if there is no project

or

- Show the current directory if there is no project

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210127
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.7-1-default (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 4800H with Radeon Graphics
Memory: 30.8 GiB of RAM
Graphics Processor: AMD RENOIR
Comment 1 Bug Janitor Service 2021-01-31 17:41:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/218
Comment 2 Alexander Lohnau 2021-01-31 19:43:12 UTC
Git commit b2b8bf573f834e9489588fda4baa6085e915a2cf by Alexander Lohnau.
Committed on 31/01/2021 at 17:40.
Pushed by cullmann into branch 'master'.

Do not restore Projects tool view when no project exists

The plugins do not have a property/method which signals that
it should not be restored in its current state. That is
why we wait for one iteration of the event loop and then
hide our tool view.

M  +8    -0    addons/project/kateprojectpluginview.cpp

https://invent.kde.org/utilities/kate/commit/b2b8bf573f834e9489588fda4baa6085e915a2cf