TavernerPOS - Source Code

Clone: 

git clone http://www.librarysmith.co.uk/tavernerPOS

 

Index » tavernerPOS : Commitdiff ce1738

PaymentView - Clear text when entering tfAmountTendered if tfAmountTendered has selected text.

Matt Smith [15-12-02 22:37]
PaymentView - Clear text when entering tfAmountTendered if tfAmountTendered has selected text.
diff --git a/src/com/floreantpos/ui/views/payment/PaymentView.java b/src/com/floreantpos/ui/views/payment/PaymentView.java
old mode 100644
new mode 100755
index da86d9b..27a5110
--- a/src/com/floreantpos/ui/views/payment/PaymentView.java
+++ b/src/com/floreantpos/ui/views/payment/PaymentView.java
@@ -312,6 +312,7 @@ public class PaymentView extends JPanel {
 				}
 			}
 			else {
+				if (textField.getSelectedText()!=null) textField.setText("");
 				String string = textField.getText();
 				int index = string.indexOf('.');
 				if (index < 0) {

Add comment
These comments are moderated so so won't be published until reviewed.