Prevent warning message in expander navigation plugin
This commit is contained in:
parent
b3edd2fa5f
commit
b7fcc9dc6f
@ -276,7 +276,8 @@ class Navigator(object):
|
||||
if old_page != -1:
|
||||
self.pages[old_page][1].inactive()
|
||||
self.pages[index][1].active(self.active_cat, self.active_view)
|
||||
self.pages[index][1].view_changed(self.active_cat, self.active_view)
|
||||
if self.active_view is not None:
|
||||
self.pages[index][1].view_changed(self.active_cat, self.active_view)
|
||||
self.title_label.set_text(self.pages[index][0])
|
||||
|
||||
def cb_close_clicked(self, button):
|
||||
|
@ -111,11 +111,7 @@ class ExpanderSidebar(BaseSidebar):
|
||||
if cat_num is not None:
|
||||
self.expanders[cat_num].set_expanded(True)
|
||||
# Set new button as selected
|
||||
try:
|
||||
button_num = self.lookup[(cat_num, view_num)]
|
||||
except KeyError as err:
|
||||
logging.warning("Key Error retrieving button number: %s" % str(err))
|
||||
button_num = 0
|
||||
button_num = self.lookup.get((cat_num, view_num))
|
||||
self.__handlers_block()
|
||||
for index, button in enumerate(self.buttons):
|
||||
if index == button_num:
|
||||
|
Loading…
Reference in New Issue
Block a user