[Kmymoney-devel] [kmymoney4] [Bug 313848] Ledger view misbehaves after editing a transaction

allan agander93 at gmail.com
Sat Jan 26 17:09:03 UTC 2013


--- Comment #6 from allan <agander93 at gmail.com> ---
I would appreciate comments as to whether this patch is the right approach.

The initial fix was diagnostic, as it was getting late.

I needed to go further back in the code.  What I found was that after an edit,
a click in the body of the transaction, outside of the editable fields,
resulted in a call to 
Register::selectItem(int row, int col), whereas clicking in the edit fields did
not.  The click was reflected in m_mouseButton - QFlags(0x1), and it was that
which later was causing the problem.

So, I needed to clear m_mouseButton, in this use case :- 
Register::selectItem(int row, int col), line 1420

     // don't support selecting when the item has an editor
     // or the item itself is not selectable
-    if (item->hasEditorOpen() || !item->isSelectable())
+    if (item->hasEditorOpen() || !item->isSelectable()) {
+      m_mouseButton = Qt::NoButton;
+    }

This fixes the problem, and no side-effects so far.

You are receiving this mail because:
You are the assignee for the bug.

More information about the KMyMoney-devel mailing list