Prevent warning message in expander navigation plugin
This commit is contained in:
@@ -276,7 +276,8 @@ class Navigator(object):
|
|||||||
if old_page != -1:
|
if old_page != -1:
|
||||||
self.pages[old_page][1].inactive()
|
self.pages[old_page][1].inactive()
|
||||||
self.pages[index][1].active(self.active_cat, self.active_view)
|
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])
|
self.title_label.set_text(self.pages[index][0])
|
||||||
|
|
||||||
def cb_close_clicked(self, button):
|
def cb_close_clicked(self, button):
|
||||||
|
@@ -111,11 +111,7 @@ class ExpanderSidebar(BaseSidebar):
|
|||||||
if cat_num is not None:
|
if cat_num is not None:
|
||||||
self.expanders[cat_num].set_expanded(True)
|
self.expanders[cat_num].set_expanded(True)
|
||||||
# Set new button as selected
|
# Set new button as selected
|
||||||
try:
|
button_num = self.lookup.get((cat_num, view_num))
|
||||||
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
|
|
||||||
self.__handlers_block()
|
self.__handlers_block()
|
||||||
for index, button in enumerate(self.buttons):
|
for index, button in enumerate(self.buttons):
|
||||||
if index == button_num:
|
if index == button_num:
|
||||||
|
Reference in New Issue
Block a user