fixed frame deletion #42

Manually merged
CastroFidel merged 1 commits from minergenon/winehelper:selection_frame into master 2025-08-07 09:21:47 +00:00
Showing only changes of commit 3e2ed1cff5 - Show all commits

View File

@ -685,9 +685,12 @@ class WineHelperGUI(QMainWindow):
if self.current_active_button in self.installed_buttons: if self.current_active_button in self.installed_buttons:
self.current_active_button = None self.current_active_button = None
# Очистить существующие кнопки # Полностью очищаем layout перед обновлением, удаляя старые виджеты (рамки с кнопками)
for btn in self.installed_buttons: while self.installed_scroll_layout.count():
btn.deleteLater() item = self.installed_scroll_layout.takeAt(0)
widget = item.widget()
if widget:
widget.deleteLater()
self.installed_buttons.clear() self.installed_buttons.clear()
if not os.path.exists(Var.USER_WORK_PATH): if not os.path.exists(Var.USER_WORK_PATH):