Mark "edit externally" button of preamble and local layout

while external editing is underway
This commit is contained in:
Juergen Spitzmueller 2022-12-23 08:19:26 +01:00
parent 5732b0482a
commit 7015d7db07

View File

@ -576,7 +576,7 @@ void PreambleModule::editExternal() {
preambleTE->document()->setPlainText(toqstr(s)); preambleTE->document()->setPlainText(toqstr(s));
tempfile_.reset(); tempfile_.reset();
editPB->setText(qt_("&Edit Externally")); editPB->setText(qt_("&Edit Externally"));
editPB->setStyleSheet(""); editPB->setIcon(QIcon());
changed(); changed();
return; return;
} }
@ -593,8 +593,8 @@ void PreambleModule::editExternal() {
preambleTE->setReadOnly(true); preambleTE->setReadOnly(true);
theFormats().edit(*current_id_, tempfilename, format); theFormats().edit(*current_id_, tempfilename, format);
editPB->setText(qt_("&End Edit")); editPB->setText(qt_("&End Edit"));
editPB->setStyleSheet( QIcon warn(getPixmap("images/", "emblem-shellescape", "svgz,png"));
colorButtonStyleSheet(QColor(255, 0, 0))); editPB->setIcon(warn);
changed(); changed();
} }
@ -755,6 +755,7 @@ void LocalLayout::editExternal() {
locallayoutTE->document()->setPlainText(toqstr(s)); locallayoutTE->document()->setPlainText(toqstr(s));
tempfile_.reset(); tempfile_.reset();
editPB->setText(qt_("&Edit Externally")); editPB->setText(qt_("&Edit Externally"));
editPB->setIcon(QIcon());
changed(); changed();
return; return;
} }
@ -771,6 +772,8 @@ void LocalLayout::editExternal() {
locallayoutTE->setReadOnly(true); locallayoutTE->setReadOnly(true);
theFormats().edit(*current_id_, tempfilename, format); theFormats().edit(*current_id_, tempfilename, format);
editPB->setText(qt_("&End Edit")); editPB->setText(qt_("&End Edit"));
QIcon warn(getPixmap("images/", "emblem-shellescape", "svgz,png"));
editPB->setIcon(warn);
validatePB->setEnabled(false); validatePB->setEnabled(false);
hideConvert(); hideConvert();
changed(); changed();