Fix manual update of the viewsource dialog, set default states of the view source checkboxes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25059 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2008-06-01 20:03:36 +00:00
parent 0bc17b0c65
commit 87103ddb21

View File

@ -76,9 +76,8 @@ void ViewSourceWidget::updateView()
setEnabled(false);
return;
}
if (autoUpdateCB->isChecked())
document_->setPlainText(controller_.getContent(
viewFullSourceCB->isChecked()));
document_->setPlainText(controller_.getContent(
viewFullSourceCB->isChecked()));
GuiViewSource::Row row = controller_.getRows();
QTextCursor c = QTextCursor(viewSourceTV->document());
@ -107,7 +106,8 @@ GuiViewSource::~GuiViewSource()
void GuiViewSource::updateView()
{
widget_->updateView();
if (widget_->autoUpdateCB->isChecked())
widget_->updateView();
}
@ -200,9 +200,9 @@ void GuiViewSource::restoreSession()
Dialog::restoreSession();
QSettings settings;
widget_->viewFullSourceCB->setChecked(
settings.value(sessionKey() + "/fullsource").toBool());
settings.value(sessionKey() + "/fullsource", false).toBool());
widget_->autoUpdateCB->setChecked(
settings.value(sessionKey() + "/autoupdate").toBool());
settings.value(sessionKey() + "/autoupdate", true).toBool());
}