dialogs/BrowseLocationsDialog.py
changeset 2305 56f1d8aca886
parent 2301 5b8a7dd43f9f
child 2575 aee08bd135d8
--- a/dialogs/BrowseLocationsDialog.py	Wed Sep 12 11:36:50 2018 +0200
+++ b/dialogs/BrowseLocationsDialog.py	Wed Sep 12 22:59:30 2018 +0200
@@ -45,9 +45,6 @@
             (_("Memory"), [LOCATION_VAR_MEMORY])]
 
 
-DIRFILTERCHOICE_OPTIONS = dict([(_(option), filter) for option, filter in GetDirFilterChoiceOptions()])
-
-
 def GetTypeFilterChoiceOptions():
     _ = NoTranslate
     return [_("All"),
@@ -72,6 +69,8 @@
         wx.Dialog.__init__(self, parent, title=_('Browse Locations'),
                            style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
 
+        self.DIRFILTERCHOICE_OPTIONS = dict(
+            [(_(option), filter) for option, filter in GetDirFilterChoiceOptions()])
         main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)
         main_sizer.AddGrowableCol(0)
         main_sizer.AddGrowableRow(1)
@@ -159,7 +158,7 @@
         self.Fit()
 
     def RefreshFilters(self):
-        self.DirFilter = DIRFILTERCHOICE_OPTIONS[self.DirFilterChoice.GetStringSelection()]
+        self.DirFilter = self.DIRFILTERCHOICE_OPTIONS[self.DirFilterChoice.GetStringSelection()]
         self.TypeFilter = self.TypeFilterChoice.GetSelection()
 
     def RefreshLocationsTree(self):