From 7ddab80d8005b142b61ef79b29b0ab1b877c8142 Mon Sep 17 00:00:00 2001 From: Anthony Torres Date: Fri, 12 Apr 2019 17:39:10 -0400 Subject: [PATCH] UI: Fix remux dialog ignoring filename changes --- UI/window-remux.cpp | 6 ++++++ UI/window-remux.hpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/UI/window-remux.cpp b/UI/window-remux.cpp index c8f15ce90..f6fa08b94 100644 --- a/UI/window-remux.cpp +++ b/UI/window-remux.cpp @@ -150,6 +150,7 @@ void RemuxEntryPathItemDelegate::setEditorData(QWidget *editor, { QLineEdit *text = editor->findChild(); text->setText(index.data().toString()); + QObject::connect(text, SIGNAL(textEdited(QString)), this, SLOT(updateText())); editor->setProperty(PATH_LIST_PROP, QVariant()); } @@ -257,6 +258,11 @@ void RemuxEntryPathItemDelegate::handleClear(QWidget *container) emit commitData(container); } +void RemuxEntryPathItemDelegate::updateText() { + QLineEdit *lineEdit = dynamic_cast(sender()); + QWidget *editor = lineEdit->parentWidget(); + emit commitData(editor); +} /********************************************************** Model - Manages the queue's data diff --git a/UI/window-remux.hpp b/UI/window-remux.hpp index ad78fb756..c98d45abe 100644 --- a/UI/window-remux.hpp +++ b/UI/window-remux.hpp @@ -189,4 +189,6 @@ private: void handleBrowse(QWidget *container); void handleClear(QWidget *container); +private slots: + void updateText(); }; -- GitLab