Skip to content

Commit

Permalink
Warning added if tab_bar_pos is not top/bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
xantric committed Mar 25, 2024
1 parent 9e7a9a1 commit 3d99a0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fury/ui/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)
from fury.ui.core import UI, Rectangle2D, TextBlock2D
from fury.utils import rotate, set_input

from warnings import warn

class Panel2D(UI):
"""A 2D UI Panel.
Expand Down Expand Up @@ -741,7 +741,7 @@ def update_tabs(self):
"""Update position, size and callbacks for tab panels."""
self.tab_panel_size = (self.size[0] // self.nb_tabs, int(0.1 * self.size[1]))
if self.tab_bar_pos.lower() not in ['top', 'bottom']:
print("WARNING: tab_bar_pos can only have value top/bottom")
warn("tab_bar_pos can only have value top/bottom")
self.tab_bar_pos = "top"

Check warning on line 745 in fury/ui/containers.py

View check run for this annotation

Codecov / codecov/patch

fury/ui/containers.py#L744-L745

Added lines #L744 - L745 were not covered by tests

if self.tab_bar_pos.lower() == "top":
Expand Down

0 comments on commit 3d99a0e

Please sign in to comment.