Skip to content

Commit cc9b551

Browse files
committed
Update all active MGED views, not just the current one.
When mv_coords is assigned, it's treated as a global in MGED. So if we want the view based value gv_coord to behave the same way, we need to update ALL the active view copies of it when the toplevel changes, not just the current view.
1 parent a0673db commit cc9b551

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mged/set.c

+6
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,12 @@ set_coords(const struct bu_structparse *UNUSED(sdp),
571571
struct mged_state *s = (struct mged_state *)data;
572572
MGED_CK_STATE(s);
573573
view_state->vs_gvp->gv_coord = mged_variables->mv_coords;
574+
// Update ALL active views to use the new value
575+
struct bu_ptbl *views = bv_set_views(&s->gedp->ged_views);
576+
for (size_t i = 0; i < BU_PTBL_LEN(views); i++) {
577+
struct bview *v = (struct bview *)BU_PTBL_GET(views, i);
578+
v->gv_coord = mged_variables->mv_coords;
579+
}
574580
}
575581

576582

0 commit comments

Comments
 (0)