Skip to content

Commit

Permalink
wxGUI/lmgr: The Data tab is now first and default (#756)
Browse files Browse the repository at this point in the history
See #748.
  • Loading branch information
lindakarlovska committed Jul 2, 2020
1 parent 9c8cfdc commit 274dcf2
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions gui/wxpython/lmgr/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def show_menu_errors(messages):

self._auimgr.Update()

wx.CallAfter(self.notebook.SetSelectionByName, 'layers')
wx.CallAfter(self.notebook.SetSelectionByName, 'catalog')

# use default window layout ?
if UserSettings.Get(
Expand Down Expand Up @@ -311,7 +311,20 @@ def _createNoteBook(self):
parent=self, style=globalvar.FNPageDStyle)
else:
self.notebook = FormNotebook(parent=self, style=wx.NB_BOTTOM)
# create displays notebook widget and add it to main notebook page

# create 'data catalog' widget and add it to main notebook page
self.datacatalog = DataCatalog(
parent=self.notebook, giface=self._giface)
self.datacatalog.showNotification.connect(
lambda message: self.SetStatusText(message))
self.datacatalog.changeMapset.connect(lambda mapset: self.ChangeMapset(mapset))
self.datacatalog.changeLocation.connect(lambda mapset, location: self.ChangeLocation(location, mapset))
self.notebook.AddPage(
page=self.datacatalog,
text=_("Data"),
name='catalog')

# create displays notebook widget
cbStyle = globalvar.FNPageStyle
if globalvar.hasAgw:
self.notebookLayers = FN.FlatNotebook(
Expand Down Expand Up @@ -372,18 +385,6 @@ def _createNoteBook(self):
else:
self.search = None

# create 'data catalog' notebook page
self.datacatalog = DataCatalog(
parent=self.notebook, giface=self._giface)
self.datacatalog.showNotification.connect(
lambda message: self.SetStatusText(message))
self.datacatalog.changeMapset.connect(lambda mapset: self.ChangeMapset(mapset))
self.datacatalog.changeLocation.connect(lambda mapset, location: self.ChangeLocation(location, mapset))
self.notebook.AddPage(
page=self.datacatalog,
text=_("Data"),
name='catalog')

# create 'python shell' notebook page
if not UserSettings.Get(
group='manager', key='hideTabs', subkey='pyshell'):
Expand Down

0 comments on commit 274dcf2

Please sign in to comment.