[gnome-calculator] Fixed conversion unit switch, fixes #748732.



commit 4b2613f614b752efefa5b1c30d3840eb85a20590
Author: Robert Roth <robert roth off gmail com>
Date:   Mon Sep 19 02:21:22 2016 +0300

    Fixed conversion unit switch, fixes #748732.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748732
    On populating the target combobox, the current value of the from combo
    was removed intentionally. This way, setting the old from value as new
    target value failed, as it did not exist in the target combo. Note that
    this has only happened with the initially selected from currency, so
    removing that from target currencies also led to inconsistencies between
    the two comboboxes. We better have the same list in both combos, in the
    worst case a user can use the same unit as both from and to unit to get
    a valid 1 conversion result.

 src/math-converter.vala |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/src/math-converter.vala b/src/math-converter.vala
index bfd2a2b..8243861 100644
--- a/src/math-converter.vala
+++ b/src/math-converter.vala
@@ -200,8 +200,6 @@ public class MathConverter : Gtk.Grid
             to_model = new Gtk.ListStore (3, typeof (string), typeof (UnitCategory), typeof (Unit));
             foreach (var u in category.get_units ())
             {
-                if (u == unit)
-                    continue;
                 to_model.append (out iter);
                 to_model.set (iter, 0, u.display_name, 1, category, 2, u, -1);
             }


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