mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Make Merge Changes dialog work in read only.
Make LFUN_CHANGES_MERGE active in read-only documents. Remove dummy call to ButtonController::addReadonly and replace with proper code.
This commit is contained in:
parent
e561358be9
commit
f02311241a
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user