Bug 243612 - Cancel transaction edit dialog gives wrong options when you click on something other than another transaction
Summary: Cancel transaction edit dialog gives wrong options when you click on somethin...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-04 23:12 UTC by Jack
Modified: 2019-08-30 13:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.2
tbaumgart: Version_5-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2010-07-04 23:12:54 UTC
Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

In the ledger (I've confirmed the same behavior in a checking and an investment account) click on the blank row at the bottom to start entering a new transaction.  If you then click on another transaction in the ledger, you get the cancel transaction edit dialog - with the option Yes (to cancel the edit), No (to save prior to canceling), or Cancel (return the the edit).  If you haven't made any changes, the No is not available, because there isn't anything to change.  (Perhaps the wording since once it's saved, you are no longer canceling the edit.)

However, if you click somewhere other than another transaction (such as a menu item) the dialog only gives the options of Yes and No, there is no Cancel.  If you haven't made any changes to the edit, the No is disabled, so the only way to return to the edit is to click on the "x" in the corner of the dialog window.  In some cases, this returns to the edit, and in some cases (if I click on the background just below the transaction editor) I have to do this twice - since the dialog pops up a second time before returning me to the edit.

Reproducible: Always



Expected Results:  
The dialog would include a Cancel option to "cancel the cancel" and just return to the edit.

This is in 3.98.2 latest svn, but when compiled from createtarball, the "about KMM" doesn't show the svn revision.
Comment 1 Thomas Baumgart 2010-07-20 15:22:22 UTC
Just a quick note so I don't forget it: Canceling and returning will be hard if you open a menu, as KMyMoney is not in control of things anymore.
Comment 2 Jack 2011-09-17 22:09:11 UTC
I just noticed that this appears to happen for any transaction edit, not just a new transaction.

Regarding the issue with KMM not always being able to continue - can you tell whether or not this is the case?  If so, then the message could be altered.  To me, the problem is that the dialog says you can save, quit, or return/cancel, but there isn't always a cancel button.  In cases where you can't return, it's OK to not have a cancel button, but the dialog should not say there is one if there really is not.
Comment 3 lwilpan 2011-12-23 21:42:51 UTC
This same behavior has been bothering me for some time, except the "click the 'x'" workaround doesn't work for me.  Simply closing the dialog box is equivalent to clicking "No"; that is, it closes and saves the transaction.  This is a real annoyance when I accidentally click somewhere else while editing a transaction, as I have no option to continue editing.

I am running KMM 4.5.3.
Comment 4 algolix 2013-04-11 07:21:15 UTC
About this case:

> In the ledger (I've confirmed the same behavior in a checking and an investment account) click on the blank row at the bottom to start entering a new transaction. If you then click on another transaction in the ledger, you get the cancel transaction edit dialog.

I think, this warning should appears, only if user input some data into the
fields (date, count, etc).  As for me, it's not rare situation, when i click
to the new line and then click back to the existing line, without changes.
It's annoying and strange to cancel "nothing".  I understand, that somewhere
in code some data structure is filled by current date and may be, some
default states, but logic of operator==(default_state_for_empty_fields,
current_state) is not correct.

And i don't want to set "forget" checkpoint, because, in regular situations
this warning is important.
Comment 5 lwilpan 2013-04-12 01:08:18 UTC
That would help, but this behavior bothers me most when I am in the middle of editing a transaction and have changes that I don't want to be saved (e.g. I haven't deleted the check number yet for a non-check transaction).
Comment 6 Ralf Habacker 2017-09-07 21:41:01 UTC
Issue is still present in version 4.8.0.
Comment 7 Jack 2017-09-07 22:18:05 UTC
Based on Comment #1 and my memory (since I haven't triggered this issue recently) I believe this is most common (and perhaps most annoying) when you click somewhere where it is KDE interrupting things, and not KMyMoney, so KMM doesn't really have enough control and doesn't know where you clicked.  If that's true, I'm not sure there is much we can do except improve the wording of the message.
Comment 8 Ralf Habacker 2018-01-01 21:47:16 UTC
Git commit 54e8c59279a75530907dce4faa1292bf1be67d79 by Ralf Habacker.
Committed on 01/01/2018 at 21:46.
Pushed by habacker into branch '4.8'.

Fix 'Cancel transaction edit dialog gives wrong options ...'

... when you click on something other than another transaction.

This commit enables the "continue" button in those cases.
If the user wants to continue the transaction edit, cancels
the event in MousePressFilter::eventFilter by returning true.
FIXED-IN:4.8.2

M  +3    -1    kmymoney/views/kgloballedgerview.cpp

https://commits.kde.org/kmymoney/54e8c59279a75530907dce4faa1292bf1be67d79