this, SLOT(updateView()));
connect(autoUpdateCB, SIGNAL(toggled(bool)),
updatePB, SLOT(setDisabled(bool)));
+ connect(autoUpdateCB, SIGNAL(toggled(bool)),
+ this, SLOT(updateView()));
connect(updatePB, SIGNAL(clicked()),
this, SLOT(updateView()));
void ViewSourceWidget::setBufferView(BufferView const * bv)
{
bv_ = bv;
+ setEnabled(bv ? true : false);
}
setEnabled(false);
return;
}
+
+ setEnabled(true);
QString content;
if (getContent(bv_, viewFullSourceCB->isChecked(), content))
void GuiViewSource::enableView(bool enable)
{
- if (!enable) {
+ widget_->setBufferView(bufferview());
+ if (!enable)
// In the opposite case, updateView() will be called anyway.
- widget_->setBufferView(bufferview());
widget_->updateView();
- }
- widget_->setEnabled(enable);
}
QSettings settings;
widget_->autoUpdateCB->setChecked(
settings.value(sessionKey() + "/autoupdate", true).toBool());
+ widget_->updateView();
}
} // namespace frontend
} // namespace lyx
-#include "GuiViewSource_moc.cpp"
+#include "moc_GuiViewSource.cpp"