From 0b984c21e81aaf3ed365832dd6d5dbfda07c74cb Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 24 Sep 2023 15:07:23 -0400 Subject: [PATCH] fix: don't reuse text in qcollapsible (#204) --- src/superqt/collapsible/_collapsible.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/superqt/collapsible/_collapsible.py b/src/superqt/collapsible/_collapsible.py index c684c58c..7bd53c06 100644 --- a/src/superqt/collapsible/_collapsible.py +++ b/src/superqt/collapsible/_collapsible.py @@ -66,8 +66,7 @@ def __init__( def setText(self, text: str) -> None: """Set the text of the toggle button.""" - current = self._toggle_btn.text() - self._toggle_btn.setText(current + text) + self._toggle_btn.setText(text) def text(self) -> str: """Return the text of the toggle button."""