X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiViewSource.cpp;h=a5beae5da691e673c05fa55d77e9ae9274527128;hb=8b7584846c4e1a9c87a004fab479722fee7e3013;hp=93c777b3bbb10dc490a3889e1990a182ff073606;hpb=14d0e66eae4d4a17e0e41100baf0d070c16c6865;p=lyx.git diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp index 93c777b3bb..a5beae5da6 100644 --- a/src/frontends/qt4/GuiViewSource.cpp +++ b/src/frontends/qt4/GuiViewSource.cpp @@ -50,6 +50,8 @@ ViewSourceWidget::ViewSourceWidget() 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())); @@ -115,6 +117,7 @@ static bool getContent(BufferView const * view, bool fullSource, QString & qstr) void ViewSourceWidget::setBufferView(BufferView const * bv) { bv_ = bv; + setEnabled(bv ? true : false); } @@ -169,7 +172,7 @@ GuiViewSource::~GuiViewSource() void GuiViewSource::updateView() { - if (!widget_->isEnabled() || widget_->autoUpdateCB->isChecked()) { + if (widget_->autoUpdateCB->isChecked()) { widget_->setBufferView(bufferview()); widget_->updateView(); }