Revision: 76597
http://sourceforge.net/p/brlcad/code/76597
Author: starseeker
Date: 2020-07-30 13:24:31 +0000 (Thu, 30 Jul 2020)
Log Message:
-----------
shift go_dlist_on
Modified Paths:
--------------
brlcad/branches/bioh/include/tclcad.h
brlcad/branches/bioh/src/libtclcad/tclcad_obj.c
brlcad/branches/bioh/src/libtclcad/view/draw.c
Modified: brlcad/branches/bioh/include/tclcad.h
===================================================================
--- brlcad/branches/bioh/include/tclcad.h 2020-07-30 13:17:49 UTC (rev
76596)
+++ brlcad/branches/bioh/include/tclcad.h 2020-07-30 13:24:31 UTC (rev
76597)
@@ -134,16 +134,23 @@
struct tclcad_ged_data {
struct ged_obj *gdv_gop;
- struct bu_vls go_rt_end_callback;
struct bu_vls go_more_args_callback;
+ // These are view related, but appear to be intended as global across all
+ // views associated with the gedp - that is why they are here and not in
+ // tclcad_view_data.
+ struct bu_hash_tbl *go_edited_paths;
+ struct bu_vls go_rt_end_callback;
+ int go_dlist_on;
+
// TODO - these really shouldn't be libtclcad specific... we don't want to
// depend on Tcl for label primitives...
struct bu_vls *go_prim_label_list;
int go_prim_label_list_size;
- struct bu_hash_tbl *go_edited_paths;
};
+// Data specific to an individual view rather than the geometry database
+// instance.
struct tclcad_view_data {
struct ged_obj *gdv_gop;
struct bu_vls gdv_edit_motion_delta_callback;
@@ -155,7 +162,6 @@
struct ged *go_gedp;
struct bview go_head_views;
int go_refresh_on;
- int go_dlist_on;
};
#define GED_OBJ_NULL ((struct ged_obj *)0)
Modified: brlcad/branches/bioh/src/libtclcad/tclcad_obj.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/tclcad_obj.c 2020-07-30 13:17:49 UTC
(rev 76596)
+++ brlcad/branches/bioh/src/libtclcad/tclcad_obj.c 2020-07-30 13:24:31 UTC
(rev 76597)
@@ -3193,6 +3193,7 @@
const char *UNUSED(usage),
int UNUSED(maxargs))
{
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
int on;
/* initialize result */
@@ -3205,7 +3206,7 @@
/* Get dlist_on state */
if (argc == 1) {
- bu_vls_printf(gedp->ged_result_str, "%d",
current_top->to_gop->go_dlist_on);
+ bu_vls_printf(gedp->ged_result_str, "%d", tgd->go_dlist_on);
return GED_OK;
}
@@ -3215,7 +3216,7 @@
return GED_ERROR;
}
- current_top->to_gop->go_dlist_on = on;
+ tgd->go_dlist_on = on;
return GED_OK;
}
@@ -6555,9 +6556,10 @@
{
struct bview *gdvp;
register int first = 1;
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
for (BU_LIST_FOR(gdvp, bview, ¤t_top->to_gop->go_head_views.l)) {
- if (current_top->to_gop->go_dlist_on && to_is_viewable(gdvp)) {
+ if (tgd->go_dlist_on && to_is_viewable(gdvp)) {
(void)dm_make_current((struct dm *)gdvp->dmp);
@@ -6602,9 +6604,10 @@
to_free_vlist_callback(unsigned int dlist, int range)
{
struct bview *gdvp;
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
for (BU_LIST_FOR(gdvp, bview, ¤t_top->to_gop->go_head_views.l)) {
- if (current_top->to_gop->go_dlist_on && to_is_viewable(gdvp)) {
+ if (tgd->go_dlist_on && to_is_viewable(gdvp)) {
(void)dm_make_current((struct dm *)gdvp->dmp);
(void)dm_free_dlists((struct dm *)gdvp->dmp, dlist, range);
}
Modified: brlcad/branches/bioh/src/libtclcad/view/draw.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/view/draw.c 2020-07-30 13:17:49 UTC
(rev 76596)
+++ brlcad/branches/bioh/src/libtclcad/view/draw.c 2020-07-30 13:24:31 UTC
(rev 76597)
@@ -92,7 +92,7 @@
dm_loadmatrix(dmp, edit_model2view, 0);
}
- if (gop->go_dlist_on) {
+ if (tgd->go_dlist_on) {
dm_draw_dlist(dmp, sp->s_dlist);
} else {
if (sp->s_iflag == UP)
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