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(); }