提交 7ddab80d 编写于 作者: A Anthony Torres 提交者: jp9000

UI: Fix remux dialog ignoring filename changes

上级 0e2fe105
...@@ -150,6 +150,7 @@ void RemuxEntryPathItemDelegate::setEditorData(QWidget *editor, ...@@ -150,6 +150,7 @@ void RemuxEntryPathItemDelegate::setEditorData(QWidget *editor,
{ {
QLineEdit *text = editor->findChild<QLineEdit *>(); QLineEdit *text = editor->findChild<QLineEdit *>();
text->setText(index.data().toString()); text->setText(index.data().toString());
QObject::connect(text, SIGNAL(textEdited(QString)), this, SLOT(updateText()));
editor->setProperty(PATH_LIST_PROP, QVariant()); editor->setProperty(PATH_LIST_PROP, QVariant());
} }
...@@ -257,6 +258,11 @@ void RemuxEntryPathItemDelegate::handleClear(QWidget *container) ...@@ -257,6 +258,11 @@ void RemuxEntryPathItemDelegate::handleClear(QWidget *container)
emit commitData(container); emit commitData(container);
} }
void RemuxEntryPathItemDelegate::updateText() {
QLineEdit *lineEdit = dynamic_cast<QLineEdit*>(sender());
QWidget *editor = lineEdit->parentWidget();
emit commitData(editor);
}
/********************************************************** /**********************************************************
Model - Manages the queue's data Model - Manages the queue's data
......
...@@ -189,4 +189,6 @@ private: ...@@ -189,4 +189,6 @@ private:
void handleBrowse(QWidget *container); void handleBrowse(QWidget *container);
void handleClear(QWidget *container); void handleClear(QWidget *container);
private slots:
void updateText();
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册