From 9493923e4d11572e0bbc6a32a18dd9a18cbc970f Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 27 Oct 2023 10:36:23 +1000 Subject: [PATCH] Avoid infinite recursion of events --- koordinates/gui/explore_tab_bar.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koordinates/gui/explore_tab_bar.py b/koordinates/gui/explore_tab_bar.py index 5d93bd2..793df08 100644 --- a/koordinates/gui/explore_tab_bar.py +++ b/koordinates/gui/explore_tab_bar.py @@ -214,6 +214,9 @@ def set_mode(self, mode: str): """ Sets the current explore mode """ + if self.current_mode() == mode: + return + for i in range(self.count()): if self.tabData(i) == mode: self.setCurrentIndex(i)