gui prefs: cancelling the qss style sheet file choice dialog would reset the current sheet value if any was priorly set

This commit is contained in:
Jean-Francois Dockes 2021-03-11 10:00:53 +01:00
parent 5c7d0ff96d
commit fc1783a1f6

View File

@ -557,12 +557,10 @@ void UIPrefsDialog::showFontDialog()
void UIPrefsDialog::showStylesheetDialog() void UIPrefsDialog::showStylesheetDialog()
{ {
qssFile = myGetFileName(false, "Select stylesheet file", true); auto newfn = myGetFileName(false, "Select stylesheet file", true);
string nm = path_getsimple(qs2path(qssFile)); if (!newfn.isEmpty()) {
if (!nm.empty()) { qssFile = newfn;
stylesheetPB->setText(path2qs(nm)); stylesheetPB->setText(path2qs(path_getsimple(qs2path(qssFile))));
} else {
stylesheetPB->setText(tr("Choose"));
} }
} }