From cdaefbf484bd07b00b13351eaf4f7c12b2dcfccc Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 1 Apr 2009 20:32:26 +0000 Subject: [PATCH] GuiViewsource: * Revert cs 28992 and do something better to fix the bug that the view source window remains disabled forever when autoUpdate is not checked and the view source window gets disabled or LyX is closed. * Update the source window, when autoUpdate checkbox is toggled. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28999 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiViewSource.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); }