From 94b1f4680d8046d6191509dd4958979b4690f394 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 17 May 2001 13:14:15 +0000
Subject: [PATCH] better error handling for getdp solver

---
 Fltk/Callbacks.cpp | 6 +++++-
 Fltk/Solvers.cpp   | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index af23e9bd63..7f18546274 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.53 2001-05-05 10:14:21 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.54 2001-05-17 13:14:15 geuzaine Exp $
 
 #include <sys/types.h>
 #include <signal.h>
@@ -1394,7 +1394,11 @@ void getdp_ok_cb(CALLBACK_ARGS){
   opt_solver_getdp_popupmessages(0, GMSH_SET, WID->getdp_butt[0]->value());
   opt_solver_getdp_mergeviews(0, GMSH_SET, WID->getdp_butt[1]->value());
 
+  int retry=0;
+  if(strcmp(opt_solver_getdp_command(0, GMSH_GET, NULL), 
+	    WID->getdp_input[2]->value())) retry=1;
   opt_solver_getdp_command(0, GMSH_SET, (char*)WID->getdp_input[2]->value());
+  if(retry) getdp_cb(NULL,NULL);
 }
 
 
diff --git a/Fltk/Solvers.cpp b/Fltk/Solvers.cpp
index b594c76876..fd54c8f007 100644
--- a/Fltk/Solvers.cpp
+++ b/Fltk/Solvers.cpp
@@ -1,4 +1,4 @@
-// $Id: Solvers.cpp,v 1.5 2001-05-04 22:42:21 geuzaine Exp $
+// $Id: Solvers.cpp,v 1.6 2001-05-17 13:14:15 geuzaine Exp $
 
 #include "Gmsh.h"
 
@@ -53,6 +53,8 @@ int GetDP(char *args){
   sock = Socket_StartProgram(progname, sockname);
   if(sock<0){
     Msg(GERROR, "Could not execute '%s'", progname);
+    WID->getdp_choice[0]->clear();
+    WID->getdp_choice[1]->clear();
     return 0;
   }
 
-- 
GitLab