]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/tex2rtf/src/tex2rtf.cpp
reduce flicker in header window when deleting items and let space select items even...
[wxWidgets.git] / utils / tex2rtf / src / tex2rtf.cpp
index cc8f64acae7d2f886c9bd8e12e59466bf5a9c178..0e44e16304b1709b06dc21b295ad45780cdce4ce 100644 (file)
@@ -665,7 +665,16 @@ void MyFrame::OnGo(wxCommandEvent& event)
       Tex2RTFYield(TRUE);
       Go();
 
-      if (runTwice)
+      if (stopRunning)
+      {
+        SetStatusText("Build aborted!");
+        wxString errBuf;
+        errBuf.Printf("\nErrors encountered during this pass: %lu\n", errorCount);
+        OnInform((char *)errBuf.c_str());
+      }
+
+
+      if (runTwice && !stopRunning)
       {
         Tex2RTFYield(TRUE);
         Go();
@@ -907,7 +916,7 @@ bool Go(void)
   ChooseOutputFile();
 #endif
 
-  if (!InputFile || !OutputFile)
+  if (!InputFile || !OutputFile || stopRunning)
     return FALSE;
 
 #ifndef NO_GUI
@@ -981,6 +990,12 @@ bool Go(void)
     OnInform("Reading LaTeX file...");
     TexLoadFile(InputFile);
 
+    if (stopRunning)
+    {
+        OkToClose = TRUE;
+        return FALSE;
+    }
+
     switch (convertMode)
     {
       case TEX_RTF:
@@ -1005,6 +1020,7 @@ bool Go(void)
     OnInform("*** Aborted by user.");
     success = FALSE;
     stopRunning = FALSE;
+    OkToClose = TRUE;
   }
 
   if (success)