]> granicus.if.org Git - graphviz/commitdiff
a lot of smyrna changes,
authorarif <devnull@localhost>
Tue, 21 Apr 2009 18:42:21 +0000 (18:42 +0000)
committerarif <devnull@localhost>
Tue, 21 Apr 2009 18:42:21 +0000 (18:42 +0000)
lib/glcomp/glcomppanel.c
lib/glcomp/glcompset.c

index dd41984e3bcf7a114ec0a94b2585c746233bbc8c..9f4b0d3b620ee3e7760956fea745bd878bff3cf7 100644 (file)
@@ -112,7 +112,6 @@ int glCompSetRemovePanel(glCompSet * s, glCompPanel * p)
            s->panels[ind] = s->panels[ind + 1];
     }
     if (found) {
-       free(p->font);
        free(p->text);
        free(p);
        s->panelcount--;
index 63e725de4de99f50ec2e8314439e37a8fbba9ae8..8a05687e1655431652aa2c09505bb7eb1595a0c5 100644 (file)
@@ -172,28 +172,32 @@ static int glCompPointInButton(glCompButton * p, float x, float y)
 int glCompSetClick(glCompSet * s, int x, int y)
 {
 
-    if (s) {
-       int ind = 0;
-       float X, Y, Z;
-
-       glCompDrawBegin();
-       glCompSetGetPos(x, y, &X, &Y, &Z);
-       glCompDrawEnd();
-
-
-       s->clickedX = X;
-       s->clickedY = Y;
-
-       for (ind = 0; ind < s->buttoncount; ind++) {
-           if ((s->buttons[ind]->visible) && (s->buttons[ind]->enabled)) {
-               if (glCompPointInButton(s->buttons[ind], X, Y)) {
-                   if (s->buttons[ind]->groupid > -1)
-                       s->buttons[ind]->status = 1;
+    if (s) 
+       {
+               int ind = 0;
+               float X, Y, Z;
+       
+               glCompDrawBegin();
+               glCompSetGetPos(x, y, &X, &Y, &Z);
+               glCompDrawEnd();
+
+
+               s->clickedX = X;
+               s->clickedY = Y;
+
+               for (ind = 0; ind < s->buttoncount; ind++) 
+               {
+                       if ((s->buttons[ind]->visible) && (s->buttons[ind]->enabled)) 
+                       {
+                               if (glCompPointInButton(s->buttons[ind], X, Y)) 
+                               {
+                                       if (s->buttons[ind]->groupid > -1)
+                                       s->buttons[ind]->status = 1;
+                               }
+                       }
                }
-           }
-       }
-       return 1;
-    } else
+               return 1;
+       } else
        return 0;
 }