This commit is contained in:
Ignacio Serantes
2026-04-07 16:22:59 +02:00
parent 9685c01760
commit bff99226b0
7 changed files with 42 additions and 37 deletions

View File

@@ -1195,7 +1195,7 @@ class SettingsDialog(QDialog):
elif self.download_model_btn:
self.download_model_btn.hide()
# --- Mascotas (Pets) ---
# --- Pets ---
if not AVAILABLE_PET_ENGINES:
self.pet_engine_combo.setEnabled(False)
self.pet_tags_edit.setEnabled(False)
@@ -1341,14 +1341,14 @@ class SettingsDialog(QDialog):
self.downloader_thread = None
def done(self, r):
self._stop_downloader_thread() # Asegura que el hilo de descarga se detenga y espere
self._stop_downloader_thread() # Ensure downloader thread stops and waits.
if self.counter_thread and self.counter_thread.isRunning():
self.counter_thread.stop()
self.counter_thread.wait()
super().done(r)
def closeEvent(self, event):
self._stop_downloader_thread() # Asegura que el hilo de descarga se detenga y espere
self._stop_downloader_thread() # Ensure downloader thread stops and waits.
if self.counter_thread and self.counter_thread.isRunning():
self.counter_thread.stop()
self.counter_thread.wait()
@@ -1366,15 +1366,15 @@ class SettingsDialog(QDialog):
if existing_p == path:
return
# Si una carpeta padre ya existe, no añadimos esta subcarpeta
# If a parent folder already exists, do not add this subfolder.
if path.startswith(existing_p + os.sep):
return
# Si la nueva ruta es padre de una existente, marcamos la existente para borrar
# If the new path is a parent of an existing one, mark it for removal.
if existing_p.startswith(path + os.sep):
to_remove.append(i)
# Borramos las subcarpetas innecesarias (en orden inverso para no alterar los índices)
# Remove unnecessary subfolders (reverse order to not alter indices).
for i in sorted(to_remove, reverse=True):
list_widget.takeItem(i)