Skip to content

Commit f140604

Browse files
committed
some nicer code and and explanation to avoid me breaking that again :)
1 parent fdcc82a commit f140604

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

larray_editor/arraywidget.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,8 @@ def set_data(self, data=None, bg_gradient=None, bg_value=None):
713713
# update filters
714714
filters_layout = self.filters_layout
715715
clear_layout(filters_layout)
716-
if len(la_data) > 0:
716+
# len(axes) > 0 is not good because we can have len 0 axes
717+
if la_data.size > 0:
717718
filters_layout.addWidget(QLabel(_("Filters")))
718719
for axis, display_name in zip(axes, display_names):
719720
filters_layout.addWidget(QLabel(display_name))

0 commit comments

Comments
 (0)