Bug 437499

Summary: Deleted pages still persist on main view when deleted while in edit mode
Product: [Applications] plasma-systemmonitor Reporter: Alex <alex765>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, kde, kde, nate, plasma-bugs
Priority: NOR    
Version: 5.21.90   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 5.22.1
Attachments: Screenshot of nonexistent page after removal

Description Alex 2021-05-22 12:45:50 UTC
Created attachment 138682 [details]
Screenshot of nonexistent page after removal

To reproduce:
1. Create a new page (left pane "Add New Page..."), which navigates you to it
2. Delete the newly created page (hamburger menu > "Edit or Remove pages..." > trashcan next to the new page > OK)

It should navigate you to some always-existing page, like Overview, but it keeps you on the now non-existent page.
Comment 1 David Redondo 2021-05-31 09:09:20 UTC
I can reproduce it when removing pages while they are in edit mode
Comment 2 David Redondo 2021-06-14 09:56:36 UTC
Git commit ca1c8cec374eca334317785667386b1298bce4ac by David Redondo.
Committed on 14/06/2021 at 09:56.
Pushed by davidre into branch 'master'.

Switch away from removed pages

When we are showing a page that was deleted or hidden, switch back
either to the starting page or if the starting page would be the
removed page the overview page.

M  +9    -0    src/main.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/ca1c8cec374eca334317785667386b1298bce4ac
Comment 3 David Redondo 2021-06-14 10:14:28 UTC
Git commit d96d748fd7d97c439f7dc8226155b4b38036b47d by David Redondo.
Committed on 14/06/2021 at 10:14.
Pushed by davidre into branch 'cherry-pick-ca1c8cec'.

Switch away from removed pages

When we are showing a page that was deleted or hidden, switch back
either to the starting page or if the starting page would be the
removed page the overview page.


(cherry picked from commit ca1c8cec374eca334317785667386b1298bce4ac)

M  +9    -0    src/main.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/d96d748fd7d97c439f7dc8226155b4b38036b47d