]> granicus.if.org Git - graphviz/commitdiff
move nodes bug fixed
authorarif <devnull@localhost>
Thu, 5 Nov 2009 16:14:20 +0000 (16:14 +0000)
committerarif <devnull@localhost>
Thu, 5 Nov 2009 16:14:20 +0000 (16:14 +0000)
cmd/smyrna/gui/glcompui.c
cmd/smyrna/topview.c

index 6f48591468f0dff59805aec29ab56f0b19825c37..6981c679193a4f2309ef3c260e9f6ecd7a18eb8f 100644 (file)
@@ -45,7 +45,7 @@ static glCompButton *panBtn;
 static void menu_click_pan(void *obj, GLfloat x, GLfloat y,
                           glMouseButtonType t)
 {
-
+        deselect_all(view->g[view->activeGraph]);
 }
 
 #ifdef UNUSED
@@ -208,7 +208,6 @@ glCompSet *glcreate_gl_topview_menu(void)
     b->common.callbacks.click = menu_click_pan;
     panBtn = b;
 
-    b->groupid = 1;
     y = y + off;
 
 
index a4155cea6b1ffe6e7ad770db3d8e32ffa07d41e9..3f2b100869785adc4f69734b40f4dff83a486178 100755 (executable)
@@ -650,9 +650,6 @@ static int drawtopviewnodes(Agraph_t * g)
                          view->selectedNodeColor.G,
                          view->selectedNodeColor.B,
                          view->selectedNodeColor.A);
-               ddx = dx;
-               ddy = dy;
-               ddz = dz;
            } else {            //get the color from node
                glColor4f(v->Color.R, v->Color.G, v->Color.B,
                          v->node_alpha * view->defaultnodealpha);
@@ -738,12 +735,12 @@ static void drawtopviewedges(Agraph_t * g)
               e->Node2->distorted_x - dddx,
               e->Node2->distorted_y - dddy,
               e->Node2->distorted_z - ddz */
-           draw_edge(e->Node1->distorted_x - ddx,
-                     e->Node1->distorted_y - ddy,
-                     e->Node1->distorted_z - ddz,
-                     e->Node2->distorted_x - dddx,
-                     e->Node2->distorted_y - dddy,
-                     e->Node2->distorted_z - ddz, e->data.edgeid, e);
+           draw_edge(e->Node1->distorted_x ,
+                     e->Node1->distorted_y ,
+                     e->Node1->distorted_z ,
+                     e->Node2->distorted_x ,
+                     e->Node2->distorted_y ,
+                     e->Node2->distorted_z , e->data.edgeid, e);
 
 
 
@@ -1119,6 +1116,8 @@ int move_TVnodes(void)
        if (v->data.Selected) {
            v->distorted_x = v->distorted_x + delX;
            v->distorted_y = v->distorted_y - delY;
+           v->x = v->x + delX;
+           v->y = v->y - delY;
        }
     }
     return 1;