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