8168: Sort custom place types in editors
This commit is contained in:
		@@ -147,11 +147,13 @@ class EditPlace(EditPrimary):
 | 
			
		||||
        self.privacy = PrivacyButton(self.top.get_object("private"), self.obj, 
 | 
			
		||||
                                     self.db.readonly)
 | 
			
		||||
 | 
			
		||||
        custom_place_types = sorted(self.db.get_place_types(),
 | 
			
		||||
                                    key=lambda s: s.lower())
 | 
			
		||||
        self.place_type = MonitoredDataType(self.top.get_object("place_type"),
 | 
			
		||||
                                            self.obj.set_type,
 | 
			
		||||
                                            self.obj.get_type,
 | 
			
		||||
                                            self.db.readonly,
 | 
			
		||||
                                            self.db.get_place_types())
 | 
			
		||||
                                            custom_place_types)
 | 
			
		||||
 | 
			
		||||
        self.code = MonitoredEntry(
 | 
			
		||||
            self.top.get_object("code_entry"),
 | 
			
		||||
 
 | 
			
		||||
@@ -137,11 +137,13 @@ class EditPlaceRef(EditReference):
 | 
			
		||||
        self.privacy = PrivacyButton(self.top.get_object("private"), self.source, 
 | 
			
		||||
                                     self.db.readonly)
 | 
			
		||||
 | 
			
		||||
        custom_place_types = sorted(self.db.get_place_types(),
 | 
			
		||||
                                    key=lambda s: s.lower())
 | 
			
		||||
        self.place_type = MonitoredDataType(self.top.get_object("place_type"),
 | 
			
		||||
                                            self.source.set_type,
 | 
			
		||||
                                            self.source.get_type,
 | 
			
		||||
                                            self.db.readonly,
 | 
			
		||||
                                            self.db.get_place_types())
 | 
			
		||||
                                            custom_place_types)
 | 
			
		||||
 | 
			
		||||
        self.code = MonitoredEntry(
 | 
			
		||||
            self.top.get_object("code_entry"),
 | 
			
		||||
 
 | 
			
		||||
@@ -555,7 +555,8 @@ class EditRule(ManagedWindow):
 | 
			
		||||
                    elif v == _('Surname origin type:'):
 | 
			
		||||
                        additional = self.db.get_origin_types()
 | 
			
		||||
                    elif v == _('Place type:'):
 | 
			
		||||
                        additional = self.db.get_place_types()
 | 
			
		||||
                        additional = sorted(self.db.get_place_types(),
 | 
			
		||||
                                            key=lambda s: s.lower())
 | 
			
		||||
                    t = MySelect(_name2typeclass[v], additional)
 | 
			
		||||
                elif v == _('Inclusive:'):
 | 
			
		||||
                    t = MyBoolean(_('Include original person'))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user