The branch, 2.0.x, has been updated.

- Log -----------------------------------------------------------------

commit c920318f42599a182ae639b36e2fdf1c2fcc658e
Author: Richard Heck <rgh...@lyx.org>
Date:   Fri Nov 9 21:04:10 2012 -0500

    Restore fix for constant resetting of View>Source widget (bug #8411).

diff --git a/src/frontends/qt4/GuiViewSource.cpp 
b/src/frontends/qt4/GuiViewSource.cpp
index 83114eb..53a63ad 100644
--- a/src/frontends/qt4/GuiViewSource.cpp
+++ b/src/frontends/qt4/GuiViewSource.cpp
@@ -197,6 +197,7 @@ void ViewSourceWidget::updateDefaultFormat()
        outputFormatCO->addItem(qt_("Default"),
                                QVariant(QString("default")));
 
+       int index = 0;
        vector<string> tmp = bv_->buffer().params().backends();
        vector<string>::const_iterator it = tmp.begin();
        vector<string>::const_iterator en = tmp.end();
@@ -206,12 +207,15 @@ void ViewSourceWidget::updateDefaultFormat()
                if (!fmt) {
                        LYXERR0("Can't find format for backend " << format << 
"!");
                        continue;
-               }
+               } 
 
-               QString const pretty =
-                       fmt ? qt_(fmt->prettyname()) : toqstr(format);
-               outputFormatCO->addItem(pretty, QVariant(toqstr(format)));
+               QString const pretty = qt_(fmt->prettyname());
+               QString const qformat = toqstr(format);
+               outputFormatCO->addItem(pretty, QVariant(qformat));
+               if (qformat == view_format_)
+                  index = outputFormatCO->count() -1;
        }
+       outputFormatCO->setCurrentIndex(index);
 
        outputFormatCO->blockSignals(false);
 }
diff --git a/status.20x b/status.20x
index 01f9fcd..9993101 100644
--- a/status.20x
+++ b/status.20x
@@ -58,6 +58,9 @@ What's new
 
 * USER INTERFACE
 
+- Fix regression in which clicking in the main work area always resets
+  the selected format in View>Source (bug #8411).
+  
 - When selecting text and Insert > Preview, immediately display the
   preview (bug #8075).
 

-----------------------------------------------------------------------

Summary of changes:
 src/frontends/qt4/GuiViewSource.cpp |   12 ++++++++----
 status.20x                          |    3 +++
 2 files changed, 11 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to