refactor: Verhindere ständiges Löschen und Neuerstellen von QGraphicsLineItem durch direktes Verschieben

Co-authored-by: aider (ollama/qwen2.5-coder:14b) <aider@aider.chat>
This commit is contained in:
Aider AI Agentandaider committed 2026-10-11 17:56:21 +02:00
1 parent b7224649f1
commit d8421e7138
1 file changed
+1 -4
+1 -4
View File
@@ -135,10 +135,7 @@ class MainWindow(QMainWindow):
def move_playhead(self):
self.current_x += 1
if self.current_x < self.timeline_length:
self.scene.removeItem(self.playhead)
self.playhead = QGraphicsLineItem(self.current_x, -5, self.current_x, 5)
self.playhead.setPen(QPen(Qt.GlobalColor.red, 2))
self.scene.addItem(self.playhead)
self.playhead.setX(self.current_x)
else:
self.pause()