Once a user inputs a fee, retain it.
It has long been a minor annoyance that this isn't the default behaviour. Semantics are as follows: - Fees are calculated automatically, as usual, and shown in black - If the user inputs a fee, it is retained, and shown in blue to indicate it is user-overridden - The user can switch back to automatic fee calculation mode in two ways: press Clear, or blank out the fee field - User fees are also cleared by do_clear(), for instance when the payment is sent I have checked all usage combinations I could think of, including the ! case, and all work in a sensible and natural fashion. This also fixes issue #995.
This commit is contained in:
@@ -45,6 +45,9 @@ class AmountEdit(MyLineEdit):
|
||||
s = s.replace('.','')
|
||||
s = s[:p] + '.' + s[p:p+self.decimal_point()]
|
||||
self.setText(s)
|
||||
# setText sets Modified to False. Instead we want to remember
|
||||
# if updates were because of user modification.
|
||||
self.setModified(self.hasFocus())
|
||||
self.setCursorPosition(pos)
|
||||
|
||||
def paintEvent(self, event):
|
||||
|
||||
Reference in New Issue
Block a user