mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +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()
|
ParagraphParameters & GuiParagraph::params()
|
||||||
{
|
{
|
||||||
if (haveMulitParSelection()) {
|
if (haveMulitParSelection()) {
|
||||||
@ -287,7 +303,7 @@ void GuiParagraph::dispatchParams()
|
|||||||
if (haveMulitParSelection()) {
|
if (haveMulitParSelection()) {
|
||||||
ostringstream data;
|
ostringstream data;
|
||||||
multiparsel_.write(data);
|
multiparsel_.write(data);
|
||||||
FuncRequest const fr(LFUN_PARAGRAPH_PARAMS_APPLY, data.str());
|
FuncRequest const fr(getLfun(), data.str());
|
||||||
dispatch(fr);
|
dispatch(fr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,9 @@ public:
|
|||||||
//@{
|
//@{
|
||||||
void updateView();
|
void updateView();
|
||||||
void dispatchParams();
|
void dispatchParams();
|
||||||
|
void enableView(bool enable);
|
||||||
bool isBufferDependent() const { return true; }
|
bool isBufferDependent() const { return true; }
|
||||||
|
virtual kb_action getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user