Revision: 76609
          http://sourceforge.net/p/brlcad/code/76609
Author:   starseeker
Date:     2020-07-31 02:40:14 +0000 (Fri, 31 Jul 2020)
Log Message:
-----------
wrap another callback

Modified Paths:
--------------
    brlcad/branches/bioh/src/libged/display_list.c
    brlcad/branches/bioh/src/libged/ged_private.h
    brlcad/branches/bioh/src/libged/set_transparency/set_transparency.c

Modified: brlcad/branches/bioh/src/libged/display_list.c
===================================================================
--- brlcad/branches/bioh/src/libged/display_list.c      2020-07-31 02:32:48 UTC 
(rev 76608)
+++ brlcad/branches/bioh/src/libged/display_list.c      2020-07-31 02:40:14 UTC 
(rev 76609)
@@ -264,8 +264,7 @@
                nsp = BU_LIST_PNEXT(solid, sp);
 
                if (db_full_path_match_top(&subpath, &sp->s_fullpath)) {
-                   if (gedp->ged_free_vlist_callback != 
GED_FREE_VLIST_CALLBACK_PTR_NULL)
-                       ged_free_vlist_cb(gedp, sp->s_dlist, 1);
+                   ged_free_vlist_cb(gedp, sp->s_dlist, 1);
 
                    BU_LIST_DEQUEUE(&sp->l);
                    FREE_SOLID(sp, &freesolid->l);
@@ -409,8 +408,7 @@
            int ret;
            int full_len = sp->s_fullpath.fp_len;
 
-           if (gedp->ged_free_vlist_callback != 
GED_FREE_VLIST_CALLBACK_PTR_NULL)
-               ged_free_vlist_cb(gedp, sp->s_dlist, 1);
+           ged_free_vlist_cb(gedp, sp->s_dlist, 1);
 
            sp->s_fullpath.fp_len = full_len - 1;
            db_dup_full_path(&dup_path, &sp->s_fullpath);
@@ -1290,7 +1288,7 @@
 
     while (BU_LIST_WHILE(gdlp, display_list, hdlp)) {
 
-       if (gedp->ged_free_vlist_callback != GED_FREE_VLIST_CALLBACK_PTR_NULL 
&& BU_LIST_NON_EMPTY(&gdlp->dl_headSolid))
+       if (BU_LIST_NON_EMPTY(&gdlp->dl_headSolid))
            ged_free_vlist_cb(gedp, BU_LIST_FIRST(solid, 
&gdlp->dl_headSolid)->s_dlist,
                    BU_LIST_LAST(solid, &gdlp->dl_headSolid)->s_dlist -
                    BU_LIST_FIRST(solid, &gdlp->dl_headSolid)->s_dlist + 1);
@@ -2453,8 +2451,9 @@
 
 
 void
-dl_set_transparency(struct bu_list *hdlp, struct directory **dpp, double 
transparency, void (*callback)(struct display_list *))
+dl_set_transparency(struct ged *gedp, struct directory **dpp, double 
transparency)
 {
+    struct bu_list *hdlp = gedp->ged_gdp->gd_headDisplay;
     struct display_list *gdlp;
     struct display_list *next_gdlp;
     struct solid *sp;
@@ -2481,8 +2480,7 @@
 
        }
 
-       if (callback != GED_CREATE_VLIST_CALLBACK_PTR_NULL)
-           (*callback)(gdlp);
+       ged_create_vlist_cb(gedp, gdlp);
 
         gdlp = next_gdlp;
     }

Modified: brlcad/branches/bioh/src/libged/ged_private.h
===================================================================
--- brlcad/branches/bioh/src/libged/ged_private.h       2020-07-31 02:32:48 UTC 
(rev 76608)
+++ brlcad/branches/bioh/src/libged/ged_private.h       2020-07-31 02:40:14 UTC 
(rev 76609)
@@ -246,7 +246,7 @@
 
 GED_EXPORT int dl_select(struct bu_list *hdlp, mat_t model2view, struct bu_vls 
*vls, double vx, double vy, double vwidth, double vheight, int rflag);
 GED_EXPORT int dl_select_partial(struct bu_list *hdlp, mat_t model2view, 
struct bu_vls *vls, double vx, double vy, double vwidth, double vheight, int 
rflag);
-GED_EXPORT void dl_set_transparency(struct bu_list *hdlp, struct directory 
**dpp, double transparency, void (*callback)(struct display_list *));
+GED_EXPORT void dl_set_transparency(struct ged *gedp, struct directory **dpp, 
double transparency);
 
 /* defined in draw.c */
 GED_EXPORT extern void _ged_cvt_vlblock_to_solids(struct ged *gedp,

Modified: brlcad/branches/bioh/src/libged/set_transparency/set_transparency.c
===================================================================
--- brlcad/branches/bioh/src/libged/set_transparency/set_transparency.c 
2020-07-31 02:32:48 UTC (rev 76608)
+++ brlcad/branches/bioh/src/libged/set_transparency/set_transparency.c 
2020-07-31 02:40:14 UTC (rev 76609)
@@ -74,7 +74,7 @@
        return GED_OK;
     }
 
-    dl_set_transparency(gedp->ged_gdp->gd_headDisplay, dpp, transparency, 
gedp->ged_create_vlist_callback);
+    dl_set_transparency(gedp, dpp, transparency);
 
     if (dpp != (struct directory **)NULL)
        bu_free((void *)dpp, "ged_set_transparency_core: directory pointers");

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to