mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Implement GuiParagraph::enableView() for readonly documents. Does not fully work yet as the paragraph alignment are not updated with cursor position.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22861 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
faf2f10824
commit
722023c413
@ -263,6 +263,22 @@ void GuiParagraph::updateView()
|
||||
}
|
||||
|
||||
|
||||
void GuiParagraph::enableView(bool enable)
|
||||
{
|
||||
indentCB->setEnabled(enable);
|
||||
linespacing->setEnabled(enable);
|
||||
labelWidth->setEnabled(enable);
|
||||
synchronizedViewCB->setEnabled(enable);
|
||||
applyPB->setEnabled(enable);
|
||||
restorePB->setEnabled(enable);
|
||||
if (!enable)
|
||||
synchronizedViewCB->setChecked(true);
|
||||
RadioMap::const_iterator it = radioMap.begin();
|
||||
for (; it != radioMap.end(); ++it)
|
||||
it->second->setEnabled(enable);
|
||||
}
|
||||
|
||||
|
||||
ParagraphParameters & GuiParagraph::params()
|
||||
{
|
||||
if (haveMulitParSelection()) {
|
||||
@ -287,7 +303,7 @@ void GuiParagraph::dispatchParams()
|
||||
if (haveMulitParSelection()) {
|
||||
ostringstream data;
|
||||
multiparsel_.write(data);
|
||||
FuncRequest const fr(LFUN_PARAGRAPH_PARAMS_APPLY, data.str());
|
||||
FuncRequest const fr(getLfun(), data.str());
|
||||
dispatch(fr);
|
||||
return;
|
||||
}
|
||||
|
@ -48,7 +48,9 @@ public:
|
||||
//@{
|
||||
void updateView();
|
||||
void dispatchParams();
|
||||
void enableView(bool enable);
|
||||
bool isBufferDependent() const { return true; }
|
||||
virtual kb_action getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
|
||||
//@}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user