move testing for no options to back-end
[xboard.git] / xoptions.c
index 097f881..7ed256a 100644 (file)
@@ -553,8 +553,10 @@ GraphEventProc(Widget widget, caddr_t client_data, XEvent *event)
            XtGetValues(widget, args, j);
 
            if(w < graph->max || w > graph->max + 1 || h != graph->value) { // use width fudge of 1 pixel
-               sizing = (((XExposeEvent*)event)->count >= 0); // suppress sizing on expose for ordered redraw in response to sizing.
-               graph->max = w; graph->value = h; // note: old values are kept if we we don't exceed width fudge
+               if(((XExposeEvent*)event)->count >= 0) { // suppress sizing on expose for ordered redraw in response to sizing.
+                   sizing = 1;
+                   graph->max = w; graph->value = h; // note: old values are kept if we we don't exceed width fudge
+               }
            } else w = graph->max;
 
            if(sizing && ((XExposeEvent*)event)->count > 0) { graph->max = 0; return; } // don't bother if further exposure is pending during resize
@@ -779,7 +781,6 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent
 
     if(engineDlg) { // Settings popup for engine: format through heuristic
        int n = currentCps->nrOptions;
-       if(!n) { DisplayNote(_("Engine has no options")); currentCps = NULL; return 0; }
        if(n > 50) width = 4; else if(n>24) width = 2; else width = 1;
        height = n / width + 1;
        if(n && (currentOption[n-1].type == Button || currentOption[n-1].type == SaveButton)) currentOption[n].min = SAME_ROW; // OK on same line