Bug 460368 - Welcome page no longer shown after closing a book
Summary: Welcome page no longer shown after closing a book
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: ux-ui (show other bugs)
Version: git (master)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 14:20 UTC by Dawid Wróbel
Modified: 2022-10-14 07:39 UTC (History)
1 user (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 Dawid Wróbel 2022-10-13 14:20:37 UTC
SUMMARY
Recent changes  in master case the welcome page no longer shown when no book is loaded. It shows for a second but gets replaced by an empty graphs — "Net Worth Forecast" in my case.

STEPS TO REPRODUCE
1. Open a book
2. Close a book

OBSERVED RESULT
Notice the graph is shown, not the welcome page


EXPECTED RESULT
Welcome page should be shown as previously
Comment 1 Ralf Habacker 2022-10-13 15:08:43 UTC
(In reply to Dawid Wróbel from comment #0)
> Recent changes  in master case the welcome page no longer shown when no book
> is loaded. It shows for a second but gets replaced by an empty graphs — "Net
> Worth Forecast" in my case.
Thanks for pointing this out, which is probably an issue with https://invent.kde.org/office/kmymoney/-/commit/897ccf9e4163c1f42e254bd81dd914827938a12d

The simplest solution is to revert this commit, fixing that commit will need some investigation.
Comment 2 Ralf Habacker 2022-10-14 07:02:20 UTC
(In reply to Ralf Habacker from comment #1)

> The simplest solution is to revert this commit, 

I did that, but it didn't help. The reason for this issue is that KMyMoneyView::loadView() does not recognize the "closed file" case.
Comment 3 Ralf Habacker 2022-10-14 07:09:17 UTC
Git commit 71a67b8280d45e42820550f45e8488a8519b87da by Ralf Habacker.
Committed on 14/10/2022 at 07:08.
Pushed by habacker into branch 'master'.

Fix 'Welcome page no longer shown after closing a book'

KHomeViewPrivate::loadView() did not recognize the case "file close".

M  +5    -1    kmymoney/views/khomeview.cpp
M  +5    -0    kmymoney/views/khomeview_p.h

https://invent.kde.org/office/kmymoney/commit/71a67b8280d45e42820550f45e8488a8519b87da
Comment 4 Ralf Habacker 2022-10-14 07:39:09 UTC
(In reply to Ralf Habacker from comment #3)
> Git commit 71a67b8280d45e42820550f45e8488a8519b87da by Ralf Habacker.
..
> KHomeViewPrivate::loadView() did not recognize the case "file close".

This problem only occurs in the master branch. In 5.1and 4.8 this is detected correctly (see https://invent.kde.org/office/kmymoney/-/blob/5.1/kmymoney/views/khomeview_p.h#L417).