Skip to content

Commit

Permalink
Fixed TreeView subclassing to disallow collapsing. Changed history la…
Browse files Browse the repository at this point in the history
…bels layout to gridlayout to fix alignment problem. Thanks @quanon!
  • Loading branch information
geojeff committed May 2, 2013
1 parent 0cf079b commit a7a8996
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/history/states/showing_processes.py
@@ -1,3 +1,4 @@
from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.togglebutton import ToggleButton
from kivy.uix.label import Label
Expand Down Expand Up @@ -32,6 +33,8 @@ def __init__(self, **kwargs):
def toggle_node(self, node):
'''Toggle the state of the node (open/collapse).
'''
if not self.allow_collapse and node.is_open:
return
node.is_open = not node.is_open
if node.is_open:
if self.load_func and not node.is_loaded:
Expand Down Expand Up @@ -141,7 +144,7 @@ def enter_state(self, context=None):

# History labels (for each state in tree)

history_labels_list = BoxLayout(orientation='vertical')
history_labels_list = GridLayout(cols=1)
self.populate_history_labels_list(
history_labels_list, self.statechart.get_state('A'))
self.populate_history_labels_list(
Expand Down

0 comments on commit a7a8996

Please sign in to comment.