GUI: mux: reset tab name when destination file name is cleared

Only the Windows version was affected. Fixes #2571.
This commit is contained in:
Moritz Bunkus 2019-06-17 20:37:07 +02:00
parent 39557e80a0
commit 8d1d365bf7
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,8 @@
* mkvmerge: the "codec name" track property wasn't copied from Matroska
files. Fixes #2566.
* MKVToolNix GUI: multiplexer: Windows: clearing the destination file name
will reset the tab name to "<No destination file>" again. Fixes #2571.
# Version 34.0.0 "Sight and Seen" 2019-05-18

View File

@ -342,6 +342,12 @@ Tab::onTitleChanged(QString newValue) {
void
Tab::setDestination(QString const &newValue) {
if (newValue.isEmpty()) {
m_config.m_destination.clear();
emit titleChanged();
return;
}
#if defined(SYS_WINDOWS)
if (!newValue.contains(QRegularExpression{Q("^[a-zA-Z]:[\\\\/]|^\\\\\\\\.+\\.+")}))
return;