Fix unhandled exception in expandersidebar
svn: r21198
This commit is contained in:
parent
33fe531672
commit
7d9cc19ed0
@ -29,6 +29,7 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
import logging
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -110,7 +111,11 @@ 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[(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:
|
||||||
|
Loading…
Reference in New Issue
Block a user