mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
* GuiViewSource.cpp:
- enable widget in read-only mode. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28270 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
23ddbe77ef
commit
241ea2fc88
@ -126,6 +126,8 @@ void ViewSourceWidget::updateView()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setEnabled(true);
|
||||||
|
|
||||||
QString content;
|
QString content;
|
||||||
if (getContent(bv_, viewFullSourceCB->isChecked(), content))
|
if (getContent(bv_, viewFullSourceCB->isChecked(), content))
|
||||||
document_->setPlainText(content);
|
document_->setPlainText(content);
|
||||||
@ -176,12 +178,10 @@ void GuiViewSource::updateView()
|
|||||||
|
|
||||||
void GuiViewSource::enableView(bool enable)
|
void GuiViewSource::enableView(bool enable)
|
||||||
{
|
{
|
||||||
if (!enable) {
|
|
||||||
// In the opposite case, updateView() will be called anyway.
|
|
||||||
widget_->setBufferView(bufferview());
|
widget_->setBufferView(bufferview());
|
||||||
|
if (!enable)
|
||||||
|
// In the opposite case, updateView() will be called anyway.
|
||||||
widget_->updateView();
|
widget_->updateView();
|
||||||
}
|
|
||||||
widget_->setEnabled(enable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -228,6 +228,7 @@ void GuiViewSource::restoreSession()
|
|||||||
QSettings settings;
|
QSettings settings;
|
||||||
widget_->autoUpdateCB->setChecked(
|
widget_->autoUpdateCB->setChecked(
|
||||||
settings.value(sessionKey() + "/autoupdate", true).toBool());
|
settings.value(sessionKey() + "/autoupdate", true).toBool());
|
||||||
|
widget_->updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user