Skip to content

Commit

Permalink
deselect data rows when switiching layers
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias47n9e committed May 27, 2015
1 parent 94b07dd commit 6bcdca7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions innstereo/main_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,21 +814,24 @@ def layer_selection_changed(self, selection):
#If one row is selected show the data view, else don't show it
if len(row_list) == 1:
row = row_list[0]
layer_object = model[row][3]
lyr_obj = model[row][3]
child = self.sw_data.get_child()
if layer_object is None:
if lyr_obj is None:
#If it has a child remove it
if child is not None:
self.sw_data.remove(child)
#Else: not a group layer
else:
#Get the treeview
treeview_object = layer_object.get_data_treeview()
treeview_object = lyr_obj.get_data_treeview()
#If there is a child remove it
if child is not None:
self.sw_data.remove(child)
#Add new treeview
self.sw_data.add(treeview_object)
data_treeview = lyr_obj.get_data_treeview()
data_selection = data_treeview.get_selection()
data_selection.unselect_all()
self.main_window.show_all()
else:
child = self.sw_data.get_child()
Expand Down

0 comments on commit 6bcdca7

Please sign in to comment.