Skip to content

Commit f7b279a

Browse files
committed
Auto-close tutorial when it ends
1 parent 7d43fa3 commit f7b279a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/napari_deeplabcut/_widgets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ def __init__(self, parent):
8585
self.message.setOpenExternalLinks(True)
8686
vlayout.addWidget(self.message)
8787
hlayout = QHBoxLayout()
88-
self.count = QLabel(f"Tip {self._current_tip + 1}|{len(self._tips)}")
88+
self.count = QLabel("")
8989
hlayout.addWidget(self.count)
9090
hlayout.addWidget(self.button_box)
9191
vlayout.addLayout(hlayout)
9292
self.setLayout(vlayout)
9393

9494
def accept(self):
95+
if self._current_tip == 0 and "walkthrough" not in self.message.text():
96+
self.reject()
9597
tip = self._tips[self._current_tip]
9698
self.message.setText(tip.msg)
9799
self.count.setText(f"Tip {self._current_tip + 1}|{len(self._tips)}")

0 commit comments

Comments
 (0)