]> granicus.if.org Git - graphviz/commitdiff
timeout bug is fixed (topfish animation hasnt been working right for a while)
authorarif <devnull@localhost>
Tue, 12 May 2009 15:23:37 +0000 (15:23 +0000)
committerarif <devnull@localhost>
Tue, 12 May 2009 15:23:37 +0000 (15:23 +0000)
cmd/smyrna/gltemplate.c
cmd/smyrna/smyrnadefs.h
cmd/smyrna/topfisheyeview.c
cmd/smyrna/topview.c
cmd/smyrna/viewport.c

index 82e4d06073e346939c1be4d3b93c5e704856dc5a..344e6e5667af6ff2b6c63ded37287fe9ad683eb6 100755 (executable)
@@ -225,26 +225,28 @@ gboolean expose_event(GtkWidget * widget, GdkEventExpose * event,
     GdkGLContext *glcontext = gtk_widget_get_gl_context(widget);
     GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable(widget);
 
-
+       if(view->flush==1)
+       {
        /*** OpenGL BEGIN ***/
-    if (!gdk_gl_drawable_gl_begin(gldrawable, glcontext))
-       return FALSE;
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-    glLoadIdentity();
-       glexpose_main(view);    //draw all stuff
+           if (!gdk_gl_drawable_gl_begin(gldrawable, glcontext))
+               return FALSE;
+           glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+           glLoadIdentity();
+               glexpose_main(view);    //draw all stuff
     /* Swap buffers */
-    if (gdk_gl_drawable_is_double_buffered(gldrawable))
-       gdk_gl_drawable_swap_buffers(gldrawable);
-    else
-       glFlush();
-    gdk_gl_drawable_gl_end(gldrawable);
+           if (gdk_gl_drawable_is_double_buffered(gldrawable))
+               gdk_gl_drawable_swap_buffers(gldrawable);
+           else
+               glFlush();
+               gdk_gl_drawable_gl_end(gldrawable);
   /*** OpenGL END ***/
-       if (view->initFile)
-       {
-               view->initFile=0;
-               if (view->activeGraph == 0)
-                       close_graph(view,0);
-               add_graph_to_viewport_from_file(view->initFileName);
+               if (view->initFile)
+               {
+                       view->initFile=0;
+                       if (view->activeGraph == 0)
+                               close_graph(view,0);
+                       add_graph_to_viewport_from_file(view->initFileName);
+               }
        }
     
        return TRUE;
index bef44a804114e8afdebb3afe626452475a8c091d..0be00fc994a1389325f77e837c761767c0401e10 100644 (file)
@@ -542,6 +542,7 @@ typedef struct _ViewInfo
        char* template_file;
        char* glade_file;
        char* attr_file;
+       int flush;
 
 
 
index e6e2bcdbdcef4409ecfea596abc648e9e7d31ab7..d0102828a3ded974f6c1be6445e7b39c6ca3bb3a 100644 (file)
@@ -37,7 +37,6 @@ static int get_temp_coords(topview* t,int level,int v,double* coord_x,double* co
 #ifdef UNUSED
 static int get_temp_coords2(topview* t,int level,int v,double* coord_x,double* coord_y,float *R,float *G,float *B);
 #endif
-static int FLUSH=1;
 
 static void color_interpolation(glCompColor srcColor,glCompColor tarColor,glCompColor* color,int levelcount,int level)
 {
@@ -518,15 +517,12 @@ void drawtopfishedges(topview * t)
 
 void drawtopologicalfisheye(topview * t)
 {
-       if (FLUSH==1)
-       {
                get_active_frame(t);
                drawtopfishnodes(t);
                drawtopfishedges(t);
                if(!t->animate)
-               drawtopfishnodelabels(t);
-               FLUSH=0;
-       }
+                       drawtopfishnodelabels(t);
+
 }
 
 
index 4999a9bf151f61ffed29acc5d44bc3dfc1e06f8f..ccc4519a29e615ebd6f8973da732fe3c1810e837 100755 (executable)
@@ -279,6 +279,7 @@ void preparetopview(Agraph_t * g, topview * t)
                t->Nodes[ind].degree = agdegree(g, v, 1, 1);
                if (t->Nodes[ind].degree > t->maxnodedegree)
                        t->maxnodedegree=t->Nodes[ind].degree;
+               view->Topview->Nodes[ind].Label=NULL;
 
                t->Nodes[ind].node_alpha = 1;
                for (e = agfstout(g, v); e; e = agnxtout(g, e)) 
index a9067f81420fe3d8a4f845b67c97cf18059dd47b..c2503112631a681f2b5498fb5618a7651363d6bb 100755 (executable)
@@ -315,7 +315,7 @@ static gboolean gl_main_expose(gpointer data) {
                        expose_event(view->drawing_area, NULL, NULL);
                return 1;
        }
-       return 0;
+       return 1;
 }
 
 void get_data_dir()
@@ -486,7 +486,7 @@ void init_viewport(ViewInfo * view)
        view->Topview->Graphdata.selectedEdgesCount=0;
        view->Topview->Graphdata.selectedNodes=0;
        view->colschms=NULL;
-
+       view->flush=1;
 
 
        //create fontset