From 241ea2fc883bb236d7d28a3583094f3cd7c8d865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sat, 24 Jan 2009 12:38:05 +0000 Subject: [PATCH] * GuiViewSource.cpp: - enable widget in read-only mode. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28270 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiViewSource.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp index 5941186b98..364512d15a 100644 --- a/src/frontends/qt4/GuiViewSource.cpp +++ b/src/frontends/qt4/GuiViewSource.cpp @@ -125,6 +125,8 @@ void ViewSourceWidget::updateView() setEnabled(false); return; } + + setEnabled(true); QString content; if (getContent(bv_, viewFullSourceCB->isChecked(), content)) @@ -176,12 +178,10 @@ void GuiViewSource::updateView() 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); } @@ -228,6 +228,7 @@ void GuiViewSource::restoreSession() QSettings settings; widget_->autoUpdateCB->setChecked( settings.value(sessionKey() + "/autoupdate", true).toBool()); + widget_->updateView(); }