Keep button active if current category is clicked
This commit is contained in:
parent
4e239310a1
commit
16d5dfff09
@ -150,9 +150,9 @@ class CategorySidebar(BaseSidebar):
|
||||
"""
|
||||
Called when a button causes a category change.
|
||||
"""
|
||||
# Make the button inactive. It will be set to active in the
|
||||
# view_changed method if the change was successful.
|
||||
button.set_active(False)
|
||||
# Make the button active. If it was already active the category will
|
||||
# not change.
|
||||
button.set_active(True)
|
||||
self.viewmanager.goto_page(cat_num, None)
|
||||
|
||||
def __make_sidebar_button(self, use_text, index, page_title, page_stock):
|
||||
|
@ -113,9 +113,9 @@ class DropdownSidebar(BaseSidebar):
|
||||
"""
|
||||
Called when a category button is clicked.
|
||||
"""
|
||||
# Make the button inactive. It will be set to active in the
|
||||
# view_changed method if the change was successful.
|
||||
button.set_active(False)
|
||||
# Make the button active. If it was already active the category will
|
||||
# not change.
|
||||
button.set_active(True)
|
||||
self.viewmanager.goto_page(cat_num, None)
|
||||
|
||||
def __view_clicked(self, button, cat_num):
|
||||
|
@ -149,9 +149,9 @@ class ExpanderSidebar(BaseSidebar):
|
||||
"""
|
||||
Called when a category button is clicked.
|
||||
"""
|
||||
# Make the button inactive. It will be set to active in the
|
||||
# view_changed method if the change was successful.
|
||||
button.set_active(False)
|
||||
# Make the button active. If it was already active the category will
|
||||
# not change.
|
||||
button.set_active(True)
|
||||
self.viewmanager.goto_page(cat_num, None)
|
||||
|
||||
def __view_clicked(self, button, cat_num, view_num):
|
||||
|
Loading…
Reference in New Issue
Block a user