On Fri, Jun 06, 2003 at 03:30:35PM +0100, John Levon wrote:

> An old bug. class changes don't trigger language update. JMarc, this
> one applies to 1.3 too I suppose. Can you apply it ?

This one works better, applied to 1.4

regards
john


Index: ControlDocument.C
===================================================================
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlDocument.C,v
retrieving revision 1.23
diff -u -p -r1.23 ControlDocument.C
--- ControlDocument.C   24 May 2003 11:54:10 -0000      1.23
+++ ControlDocument.C   6 Jun 2003 14:42:00 -0000
@@ -63,10 +63,14 @@ void ControlDocument::apply()
        if (!bufferIsAvailable())
                return;
 
-       classApply();
-
        view().apply();
+
+       // this must come first so that a language change
+       // is correctly noticed
        setLanguage();
+
+       classApply();
+
        buffer()->params = *bp_;
 
        lv_.view()->redoCurrentBuffer();
@@ -114,7 +118,6 @@ void ControlDocument::classApply()
                return;
 
        // successfully loaded
-       view().apply();
        buffer()->params = *bp_;
 
        lv_.message(_("Converting document to new document class..."));
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v
retrieving revision 1.332
diff -u -p -r1.332 ChangeLog
--- ChangeLog   3 Jun 2003 15:10:08 -0000       1.332
+++ ChangeLog   6 Jun 2003 14:42:03 -0000
@@ -1,3 +1,8 @@
+2003-06-06  John Levon  <[EMAIL PROTECTED]>
+
+       * ControlDocument.C: make sure a language change
+       always gets propogated
+
 2003-06-03  John Levon  <[EMAIL PROTECTED]>
 
        * ControlGraphics.C: make file path relative for the GUI,

Reply via email to