Revision: 76598
http://sourceforge.net/p/brlcad/code/76598
Author: starseeker
Date: 2020-07-30 13:38:25 +0000 (Thu, 30 Jul 2020)
Log Message:
-----------
shift go_refresh_on
Modified Paths:
--------------
brlcad/branches/bioh/include/tclcad.h
brlcad/branches/bioh/src/libtclcad/tclcad_mouse.c
brlcad/branches/bioh/src/libtclcad/tclcad_obj.c
brlcad/branches/bioh/src/libtclcad/tclcad_polygons.c
brlcad/branches/bioh/src/libtclcad/view/arrows.c
brlcad/branches/bioh/src/libtclcad/view/axes.c
brlcad/branches/bioh/src/libtclcad/view/labels.c
brlcad/branches/bioh/src/libtclcad/view/lines.c
brlcad/branches/bioh/src/libtclcad/view/refresh.c
Modified: brlcad/branches/bioh/include/tclcad.h
===================================================================
--- brlcad/branches/bioh/include/tclcad.h 2020-07-30 13:24:31 UTC (rev
76597)
+++ brlcad/branches/bioh/include/tclcad.h 2020-07-30 13:38:25 UTC (rev
76598)
@@ -142,6 +142,7 @@
struct bu_hash_tbl *go_edited_paths;
struct bu_vls go_rt_end_callback;
int go_dlist_on;
+ int go_refresh_on;
// TODO - these really shouldn't be libtclcad specific... we don't want to
// depend on Tcl for label primitives...
@@ -161,7 +162,6 @@
struct ged_obj {
struct ged *go_gedp;
struct bview go_head_views;
- int go_refresh_on;
};
#define GED_OBJ_NULL ((struct ged_obj *)0)
Modified: brlcad/branches/bioh/src/libtclcad/tclcad_mouse.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/tclcad_mouse.c 2020-07-30 13:24:31 UTC
(rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/tclcad_mouse.c 2020-07-30 13:38:25 UTC
(rev 76598)
@@ -2157,8 +2157,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_mouse_poly_circ_func(interp, gedp, gdvp, argc, argv, usage);
}
@@ -2334,8 +2336,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_mouse_poly_cont_func(interp, gedp, gdvp, argc, argv, usage);
}
@@ -2477,8 +2481,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_mouse_poly_ell_func(interp, gedp, gdvp, argc, argv, usage);
}
@@ -2662,8 +2668,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_mouse_poly_rect_func(interp, gedp, gdvp, argc, argv, usage);
}
Modified: brlcad/branches/bioh/src/libtclcad/tclcad_obj.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/tclcad_obj.c 2020-07-30 13:24:31 UTC
(rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/tclcad_obj.c 2020-07-30 13:38:25 UTC
(rev 76598)
@@ -1304,10 +1304,10 @@
bu_vls_init(&tgd->go_more_args_callback);
tgd->go_edited_paths = bu_hash_create(0);
tgd->gdv_gop = top->to_gop;
+ tgd->go_refresh_on = 1;
gedp->u_data = (void *)tgd;
bu_vls_strcpy(&top->to_gop->go_gedp->go_name, argv[1]);
- top->to_gop->go_refresh_on = 1;
BU_LIST_INIT(&top->to_gop->go_head_views.l);
@@ -1838,8 +1838,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_data_move_func(gedp, gdvp, argc, argv, usage);
}
@@ -2245,8 +2247,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_data_move_object_mode_func(gedp, gdvp, argc, argv, usage);
}
@@ -2341,8 +2345,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_data_move_point_mode_func(gedp, gdvp, argc, argv, usage);
}
@@ -2436,8 +2442,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_data_pick_func(gedp, gdvp, argc, argv, usage);
}
Modified: brlcad/branches/bioh/src/libtclcad/tclcad_polygons.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/tclcad_polygons.c 2020-07-30
13:24:31 UTC (rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/tclcad_polygons.c 2020-07-30
13:38:25 UTC (rev 76598)
@@ -1022,8 +1022,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
ret = to_data_polygons_func(interp, gedp, gdvp, argc, argv);
if (ret & GED_ERROR)
@@ -1103,8 +1105,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_poly_circ_mode_func(interp, gedp, gdvp, argc, argv, usage);
}
@@ -1376,8 +1380,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_poly_cont_build_func(interp, gedp, gdvp, argc, argv, usage, 0);
}
@@ -1446,8 +1452,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_poly_cont_build_end_func(gdvp, argc, argv);
}
@@ -1534,8 +1542,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_poly_ell_mode_func(interp, gedp, gdvp, argc, argv, usage);
}
@@ -1692,8 +1702,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
return to_poly_rect_mode_func(interp, gedp, gdvp, argc, argv, usage);
}
Modified: brlcad/branches/bioh/src/libtclcad/view/arrows.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/view/arrows.c 2020-07-30 13:24:31 UTC
(rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/view/arrows.c 2020-07-30 13:38:25 UTC
(rev 76598)
@@ -58,8 +58,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
ret = to_data_arrows_func(interp, gedp, gdvp, argc, argv);
if (ret & GED_ERROR)
Modified: brlcad/branches/bioh/src/libtclcad/view/axes.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/view/axes.c 2020-07-30 13:24:31 UTC
(rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/view/axes.c 2020-07-30 13:38:25 UTC
(rev 76598)
@@ -466,8 +466,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
ret = to_data_axes_func(interp, gedp, gdvp, argc, argv);
if (ret & GED_ERROR)
Modified: brlcad/branches/bioh/src/libtclcad/view/labels.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/view/labels.c 2020-07-30 13:24:31 UTC
(rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/view/labels.c 2020-07-30 13:38:25 UTC
(rev 76598)
@@ -58,8 +58,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
ret = to_data_labels_func(interp, gedp, gdvp, argc, argv);
if (ret & GED_ERROR)
Modified: brlcad/branches/bioh/src/libtclcad/view/lines.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/view/lines.c 2020-07-30 13:24:31 UTC
(rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/view/lines.c 2020-07-30 13:38:25 UTC
(rev 76598)
@@ -88,8 +88,10 @@
}
/* Don't allow go_refresh() to be called */
- if (current_top != NULL)
- current_top->to_gop->go_refresh_on = 0;
+ if (current_top != NULL) {
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ tgd->go_refresh_on = 0;
+ }
struct bview *btmp = gedp->ged_gvp;
Modified: brlcad/branches/bioh/src/libtclcad/view/refresh.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/view/refresh.c 2020-07-30 13:24:31 UTC
(rev 76597)
+++ brlcad/branches/bioh/src/libtclcad/view/refresh.c 2020-07-30 13:38:25 UTC
(rev 76598)
@@ -138,9 +138,14 @@
void
to_refresh_view(struct bview *gdvp)
{
- if (current_top == NULL || !current_top->to_gop->go_refresh_on)
+
+ if (current_top == NULL)
return;
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
+ if (!tgd->go_refresh_on)
+ return;
+
if (to_is_viewable(gdvp))
go_refresh(current_top->to_gop, gdvp);
}
@@ -209,6 +214,7 @@
int UNUSED(maxargs))
{
int on;
+ struct tclcad_ged_data *tgd = (struct tclcad_ged_data
*)current_top->to_gop->go_gedp->u_data;
/* initialize result */
bu_vls_trunc(gedp->ged_result_str, 0);
@@ -220,7 +226,7 @@
/* Get refresh_on state */
if (argc == 1) {
- bu_vls_printf(gedp->ged_result_str, "%d",
current_top->to_gop->go_refresh_on);
+ bu_vls_printf(gedp->ged_result_str, "%d", tgd->go_refresh_on);
return GED_OK;
}
@@ -230,7 +236,7 @@
return GED_ERROR;
}
- current_top->to_gop->go_refresh_on = on;
+ tgd->go_refresh_on = on;
return GED_OK;
}
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