Bug 405222

Summary: Remember the last used folder after setting a user avatar from file system
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_usersAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: nate
Priority: NOR    
Version First Reported In: 5.27.80   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.4.0
Sentry Crash Report:

Description Patrick Silva 2019-03-08 15:49:05 UTC
SUMMARY
I have a folder located out of my home containing several avatars.
Every time I use "Load from file..." feature in User Manager I need
to navigate to the same folder because the file dialog always use my home
as initial path.

STEPS TO REPRODUCE
1. search for "user manager" in the apps launcher and open it
2. click on your current avatar, select "Load from file..."
3. choose a file located out of your home
4. repeat the step 2

OBSERVED RESULT
We can notice that the path of the file chosen in the step 3 was not remembered.

EXPECTED RESULT
user manager always remembers the last used folder.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 1 Nate Graham 2020-05-21 23:24:11 UTC
This is fixed in the Plasma 5.20 rewrite.
Comment 2 Patrick Silva 2020-12-19 12:37:51 UTC
This bug is reproducible with Users KCM.

1. open System Settings > Users
2. click on your user acccount
3. click on your user avatar
4. click on "Choose File..." button
5. ser a image located in any folder but the Pictures one as your user avatar
6. close System Settings
7. repeat the steps 1-4

Observed result: after you repeat the step 4, the file open dialog opens in Pictures folder.

Expected result: file open dialog should open the folder used by the first time in the step 4

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Comment 3 Patrick Silva 2023-11-17 20:02:54 UTC
Still an issue. And now Documents is the default location instead of Pictures.
Comment 4 Bug Janitor Service 2025-01-29 02:58:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5130
Comment 5 Nate Graham 2025-01-29 17:48:27 UTC
Git commit 98fee9e73dc35b40dc107da90dd980adaa049a01 by Nate Graham.
Committed on 29/01/2025 at 17:10.
Pushed by ngraham into branch 'master'.

kcms/users: Remember last-used location in image picker dialog

Use the state config for this. Feels like rather a lot of boilerplate,
but oh well.
FIXED-IN: 6.4.0

M  +2    -0    kcms/users/src/ui/PicturesSheet.qml
M  +30   -0    kcms/users/src/user.cpp
M  +6    -0    kcms/users/src/user.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/98fee9e73dc35b40dc107da90dd980adaa049a01