Skip to content

Commit 8a77e28

Browse files
Brain.add_data: toggle render after removing data
1 parent ba619dc commit 8a77e28

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

surfer/viz.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -948,19 +948,19 @@ def time_label(x):
948948
name="time_label", row=row, col=col,
949949
font_size=time_label_size,
950950
justification='right')
951-
if initial_time_index is not None:
952-
self.set_data_time_index(initial_time_index)
953-
self._toggle_render(True, views)
954951
data['surfaces'] = surfs
955952
data['colorbars'] = bars
956953
data['orig_ctable'] = ct
957954

958955
if remove_existing and self.data_dict[hemi] is not None:
959956
for surf in self.data_dict[hemi]['surfaces']:
960957
surf.parent.parent.remove()
961-
962958
self.data_dict[hemi] = data
963959

960+
if initial_time_index is not None:
961+
self.set_data_time_index(initial_time_index)
962+
self._toggle_render(True, views)
963+
964964
def add_annotation(self, annot, borders=True, alpha=1, hemi=None,
965965
remove_existing=True):
966966
"""Add an annotation file.

0 commit comments

Comments
 (0)