Diff-Icons werden jetzt beim Projektladen und nach Transformation korrekt angezeigt
Fix für zwei Probleme: 1. Icons fehlten beim ersten Transformationsdurchlauf via TreeNode 2. Icons fehlten direkt nach Projektladen Lösung: - _update_diff_icons_for_existing_pdfs() in _load_nodes_to_tree() hinzugefügt - _update_diff_icons_for_existing_pdfs() in _on_all_transformations_finished() hinzugefügt - Doppelten Aufruf in open_existing_project() entfernt Icons werden jetzt zuverlässig aktualisiert nach: - Projektladen - Jeder Transformation (einzeln oder via TreeNode) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -347,15 +347,12 @@ class MainWindow(QMainWindow):
|
||||
self.pdf_project.writeSettings(project_dir=project.project_dir)
|
||||
print(f"Standard-Projekt-Einstellungen in {project_yaml_path} gespeichert")
|
||||
|
||||
# Lade die Nodes in das TreeWidget
|
||||
# Lade die Nodes in das TreeWidget (inkl. Diff-PDF-Counts und Icons)
|
||||
self._load_nodes_to_tree()
|
||||
|
||||
# Starte Hash-Berechnung für alle XML-Dateien
|
||||
self._start_xml_hash_calculation()
|
||||
|
||||
# Setze Icons für bereits existierende Diff-PDFs
|
||||
self._update_diff_icons_for_existing_pdfs()
|
||||
|
||||
except Exception as e:
|
||||
print(f"Fehler beim Laden des Projekts '{project.name}': {e}")
|
||||
# Fallback: Erstelle Standard-Einstellungen
|
||||
@@ -1226,8 +1223,9 @@ class MainWindow(QMainWindow):
|
||||
|
||||
print(f"{len(self.pdf_project.nodes)} Root-Nodes in TreeWidget geladen (alphabetisch sortiert)")
|
||||
|
||||
# Aktualisiere Diff-PDF-Anzahl nach dem Laden
|
||||
# Aktualisiere Diff-PDF-Anzahl und Icons nach dem Laden
|
||||
self._update_all_diff_pdf_counts()
|
||||
self._update_diff_icons_for_existing_pdfs()
|
||||
|
||||
except Exception as e:
|
||||
print(f"Fehler beim Laden der Nodes in TreeWidget: {e}")
|
||||
@@ -3536,8 +3534,9 @@ class MainWindow(QMainWindow):
|
||||
"""
|
||||
logger.info(f"Alle Transformationen abgeschlossen: {successful_count}/{total_count} erfolgreich")
|
||||
|
||||
# Aktualisiere Diff-PDF-Anzahl in allen Knoten
|
||||
# Aktualisiere Diff-PDF-Anzahl und Icons in allen Knoten
|
||||
self._update_all_diff_pdf_counts()
|
||||
self._update_diff_icons_for_existing_pdfs()
|
||||
|
||||
if successful_count == total_count:
|
||||
self.statusBar().showMessage(f"✓ Alle {total_count} Transformationen erfolgreich", 5000)
|
||||
|
||||
Reference in New Issue
Block a user