From 6b38e74ecb81e05bc2395633b4c380799a8e38f1 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Fri, 25 Nov 2016 22:50:36 +0100 Subject: [PATCH] 9373: Values not saved and bug in monitoredwidgets --- gramps/gui/editors/editplace.py | 3 ++- gramps/gui/editors/editplaceref.py | 2 ++ gramps/gui/widgets/monitoredwidgets.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps/gui/editors/editplace.py b/gramps/gui/editors/editplace.py index 9b0d14ef1..c4ae13193 100644 --- a/gramps/gui/editors/editplace.py +++ b/gramps/gui/editors/editplace.py @@ -186,6 +186,8 @@ class EditPlace(EditPrimary): self.latitude.set_text(value[:coma]) self.top.get_object("lat_entry").validate(force=True) self.top.get_object("lon_entry").validate(force=True) + self.obj.set_latitude(self.latitude.get_value()) + self.obj.set_longitude(self.longitude.get_value()) except: pass @@ -297,7 +299,6 @@ class EditPlace(EditPrimary): def save(self, *obj): self.ok_button.set_sensitive(False) - if self.obj.get_name().get_value().strip() == '': msg1 = _("Cannot save place. Name not entered.") msg2 = _("You must enter a name before saving.") diff --git a/gramps/gui/editors/editplaceref.py b/gramps/gui/editors/editplaceref.py index eede8cfd3..f69e85c00 100644 --- a/gramps/gui/editors/editplaceref.py +++ b/gramps/gui/editors/editplaceref.py @@ -179,6 +179,8 @@ class EditPlaceRef(EditReference): self.latitude.set_text(value[:coma]) self.top.get_object("lat_entry").validate(force=True) self.top.get_object("lon_entry").validate(force=True) + self.obj.set_latitude(self.latitude.get_value()) + self.obj.set_longitude(self.longitude.get_value()) except: pass diff --git a/gramps/gui/widgets/monitoredwidgets.py b/gramps/gui/widgets/monitoredwidgets.py index 52bb8ceb0..4a2c59c60 100644 --- a/gramps/gui/widgets/monitoredwidgets.py +++ b/gramps/gui/widgets/monitoredwidgets.py @@ -144,7 +144,7 @@ class MonitoredEntry: def force_value(self, value): self.obj.set_text(value) - def get_value(self, value): + def get_value(self): return str(self.obj.get_text()) def enable(self, value):