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()
{
qssFile = myGetFileName(false, "Select stylesheet file", true);
string nm = path_getsimple(qs2path(qssFile));
if (!nm.empty()) {
stylesheetPB->setText(path2qs(nm));
} else {
stylesheetPB->setText(tr("Choose"));
auto newfn = myGetFileName(false, "Select stylesheet file", true);
if (!newfn.isEmpty()) {
qssFile = newfn;
stylesheetPB->setText(path2qs(path_getsimple(qs2path(qssFile))));
}
}