Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bugfix imgui right click menu
  • Loading branch information
kushalkolar committed May 15, 2025
commit 494f657deac944ea96c78d48ccb95174d2ed6923
5 changes: 4 additions & 1 deletion fastplotlib/ui/right_click_menus/_standard_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, figure, fa_icons):
# whether the right click menu is currently open or not
self.is_open: bool = False

def get_subplot(self) -> PlotArea | bool:
def get_subplot(self) -> PlotArea | bool | None:
"""get the subplot that a click occurred in"""
if self._last_right_click_pos is None:
return False
Expand All @@ -40,6 +40,9 @@ def get_subplot(self) -> PlotArea | bool:
if subplot.viewport.is_inside(*self._last_right_click_pos):
return subplot

# not inside a subplot
return False

def cleanup(self):
"""called when the popup disappears"""
self.is_open = False
Expand Down