diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index e1d78a012f..7c890003f3 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -1048,7 +1048,7 @@ void LyXAction::init() * \li Origin: Levon, 16 Oct 2002 * \endvar */ - { LFUN_CHANGES_MERGE, "changes-merge", Noop, Edit }, + { LFUN_CHANGES_MERGE, "changes-merge", ReadOnly, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_CHANGES_OUTPUT diff --git a/src/frontends/qt/GuiChanges.cpp b/src/frontends/qt/GuiChanges.cpp index e6363cd6be..812888f635 100644 --- a/src/frontends/qt/GuiChanges.cpp +++ b/src/frontends/qt/GuiChanges.cpp @@ -46,8 +46,6 @@ GuiChanges::GuiChanges(GuiView & lv) bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy); bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel)); - bc().addReadOnly(acceptPB); - bc().addReadOnly(rejectPB); } @@ -60,8 +58,8 @@ void GuiChanges::updateContents() Change const & c = bufferview()->getCurrentChange(); bool const changePresent = c.type != Change::UNCHANGED; - rejectPB->setEnabled(changePresent); - acceptPB->setEnabled(changePresent); + rejectPB->setEnabled(changePresent && !isBufferReadonly()); + acceptPB->setEnabled(changePresent && !isBufferReadonly()); bool const inserted = c.type == Change::INSERTED; QString text;