]> git.lyx.org Git - features.git/commitdiff
somewhat managed to misunderstand the logic. should be ok now, sorry.
authorAlfredo Braunstein <abraunst@lyx.org>
Fri, 18 Jul 2003 07:51:21 +0000 (07:51 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Fri, 18 Jul 2003 07:51:21 +0000 (07:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7313 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lyx_main.C

index 70c92ad362ee7136f5f3e7941363404376cd1707..3cfa7a23fb6f6de53b0176005e5762a983ff82c2 100644 (file)
@@ -9,6 +9,10 @@
        * text3.C: two-phase drawing for InsetText and InsetTabular
        some float -> int changes.
 
+2003-07-18  Alfredo Braunstein  <abraunst@libero.it>
+
+       * lyx_main.C: fix the fix
+
 2003-07-18  Alfredo Braunstein  <abraunst@libero.it>
 
        * lyx_main.C: fix a crash in batch mode if no files specified
index 2a6b9b84ccd6bd7dd28c15b7041bfdaef6b5313c..b61fe85291ca827dffca27b07e296fddbf3800d8 100644 (file)
@@ -167,17 +167,15 @@ LyX::LyX(int & argc, char * argv[])
                        }
                }
 
-               bool success = false;
-
                // try to dispatch to last loaded buffer first
-               if (last_loaded)
-                       last_loaded->dispatch(batch_command, &success);
-               else
-                       lyxerr << _("Batch command specified but no "
-                                   "file loaded. Exiting.") << endl;
-
-               QuitLyX();
-               exit(!success);
+               if (last_loaded) {
+                       bool success = false;
+                       if (last_loaded->dispatch(batch_command, &success)) {
+                               QuitLyX();
+                               exit(!success);
+                       }
+               } 
+               files.clear(); // the files are already loaded
        }
 
        lyx_gui::start(batch_command, files);