From 0f8775e42d1383b67b3efc1e242c62c15a832734 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 15 Nov 2018 15:22:44 +0100 Subject: [PATCH] GUI: the "Choose" label on the style sheet button would disappear when the file choice dialog was cancelled --- src/qtgui/uiprefs_w.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp index e090b5f7..012f7766 100644 --- a/src/qtgui/uiprefs_w.cpp +++ b/src/qtgui/uiprefs_w.cpp @@ -438,7 +438,11 @@ void UIPrefsDialog::showStylesheetDialog() { qssFile = myGetFileName(false, "Select stylesheet file", true); string nm = path_getsimple((const char *)qssFile.toLocal8Bit()); - stylesheetPB->setText(QString::fromLocal8Bit(nm.c_str())); + if (!nm.empty()) { + stylesheetPB->setText(QString::fromLocal8Bit(nm.c_str())); + } else { + stylesheetPB->setText(tr("Choose")); + } } void UIPrefsDialog::resetStylesheet()