[gnome-calculator] Allow multiple decimal points (fixes #166, fixes #5)



commit c70d0948dfa43bb6dd15516279da60cf44622ace
Author: Robert Roth <robert roth off gmail com>
Date:   Mon Mar 8 11:33:05 2021 +0200

    Allow multiple decimal points (fixes #166, fixes #5)

 lib/math-equation.vala | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/lib/math-equation.vala b/lib/math-equation.vala
index 4e30307d..8344ba28 100644
--- a/lib/math-equation.vala
+++ b/lib/math-equation.vala
@@ -960,9 +960,7 @@ public class MathEquation : Gtk.SourceBuffer
             iter_prev.forward_char ();
         }
 
-        /** if the current number doesn't contain decimal point yet, add one */
-        if (!current_number.contains ("."))
-            insert (serializer.get_radix ().to_string ());
+        insert (serializer.get_radix ().to_string ());
     }
 
     public void insert_number (Number x)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]