]> granicus.if.org Git - graphviz/commitdiff
*** empty log message ***
authorarif <devnull@localhost>
Mon, 13 Oct 2008 21:19:21 +0000 (21:19 +0000)
committerarif <devnull@localhost>
Mon, 13 Oct 2008 21:19:21 +0000 (21:19 +0000)
cmd/smyrna/gltemplate.c
cmd/smyrna/topview.c

index aa9dabf2faead205b4683e6f2c2e67dd45cc0505..0c1f69feaa8dff5b074242f9603b30c6a3e7175f 100755 (executable)
@@ -242,9 +242,9 @@ gboolean expose_event(GtkWidget * widget, GdkEventExpose * event,
 static gboolean button_press_event(GtkWidget * widget,
                                   GdkEventButton * event, gpointer data)
 {
-    if (view->graphCount) {
-       if (glCompSetClick
-           (view->Topview->topviewmenu, (int) event->x, (int) event->y))
+    if (view->graphCount)
+       {
+               if (glCompSetClick(view->Topview->topviewmenu, (int) event->x, (int) event->y))
            expose_event(view->drawing_area, NULL, NULL);
     }
 
@@ -252,30 +252,36 @@ static gboolean button_press_event(GtkWidget * widget,
     begin_y = (float) event->y;
 
     if (event->button == 3)    //right click
-       view->mouse.button = rightmousebutton;
-
+       {
+               view->mouse.button = rightmousebutton;
+               if (GetOGLPosRef    ((int) begin_x, (int) begin_y, &(view->GLx), &(view->GLy),
+            &(view->GLz))) 
+               {
+                               expose_event(view->drawing_area, NULL, NULL);
+               }
 
+       }
     if (event->button == 1)    //left click
     {
-       view->prevpanx = view->panx;
-       view->prevpany = view->pany;
-       view->mouse.mouse_down = 1;
-       view->mouse.button = leftmousebutton;
-       if (GetOGLPosRef
-           ((int) begin_x, (int) begin_y, &(view->GLx), &(view->GLy),
-            &(view->GLz))) {
-           if (view->mouse.mouse_mode == MM_SINGLE_SELECT)     //single select
-           {
-               view->Selection.Active = 1;
-               view->Selection.Type = 0;
-               view->Selection.AlreadySelected = 0;
-               view->Selection.X = view->GLx - SINGLE_SELECTION_WIDTH / 2;
-               view->Selection.Y = view->GLy - SINGLE_SELECTION_WIDTH / 2;
-               view->Selection.W = SINGLE_SELECTION_WIDTH;
-               view->Selection.H = SINGLE_SELECTION_WIDTH;
-               expose_event(view->drawing_area, NULL, NULL);
-           }
-       }
+               view->prevpanx = view->panx;
+               view->prevpany = view->pany;
+               view->mouse.mouse_down = 1;
+               view->mouse.button = leftmousebutton;
+               if (GetOGLPosRef    ((int) begin_x, (int) begin_y, &(view->GLx), &(view->GLy),
+            &(view->GLz))) 
+               {
+                       if (view->mouse.mouse_mode == MM_SINGLE_SELECT) //single select
+                       {
+                               view->Selection.Active = 1;
+                               view->Selection.Type = 0;
+                               view->Selection.AlreadySelected = 0;
+                               view->Selection.X = view->GLx - SINGLE_SELECTION_WIDTH / 2;
+                               view->Selection.Y = view->GLy - SINGLE_SELECTION_WIDTH / 2;
+                               view->Selection.W = SINGLE_SELECTION_WIDTH;
+                               view->Selection.H = SINGLE_SELECTION_WIDTH;
+                               expose_event(view->drawing_area, NULL, NULL);
+                       }
+               }
     }
     return FALSE;
 }
@@ -332,7 +338,6 @@ static gboolean button_release_event(GtkWidget * widget,
        }
        if (view->mouse.mouse_mode==MM_PAN)
                {
-                       view->mouse.pick=1;
                        expose_event(view->drawing_area, NULL, NULL);
 
                }
index 4fd0034744a24fc445c6a20c0ebe649525c1268a..76edfb97a58a8473552195cec68151c5380720c7 100755 (executable)
Binary files a/cmd/smyrna/topview.c and b/cmd/smyrna/topview.c differ