Skip to content

Commit 7ecee45

Browse files
authored
Do not let -Bz trigger x-y basemap (#4290)
* Do not let -Bz trigger x-y basemap Closes #4181. * Update gmt_init.c
1 parent fb945eb commit 7ecee45

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/gmt_init.c

+12-6
Original file line numberDiff line numberDiff line change
@@ -3624,8 +3624,10 @@ GMT_LOCAL int gmtinit_set_titem (struct GMT_CTRL *GMT, struct GMT_PLOT_AXIS *A,
36243624
break;
36253625
}
36263626

3627-
GMT->current.map.frame.draw = true;
3628-
if (axis == 'z') GMT->current.map.frame.drawz = true;
3627+
if (axis == 'z')
3628+
GMT->current.map.frame.drawz = true;
3629+
else
3630+
GMT->current.map.frame.draw = true;
36293631

36303632
return (GMT_NOERROR);
36313633
}
@@ -3656,8 +3658,10 @@ GMT_LOCAL int gmtinit_decode_tinfo (struct GMT_CTRL *GMT, int axis, char flag, c
36563658
if (n_int[1]) A->item[GMT_ANNOT_UPPER+!GMT->current.map.frame.primary].special = true; /* custom interval annotations */
36573659
if (n_int[2]) A->item[GMT_TICK_UPPER+!GMT->current.map.frame.primary].special = true; /* custom tick annotations */
36583660
if (n_int[3]) A->item[GMT_GRID_UPPER+!GMT->current.map.frame.primary].special = true; /* custom gridline annotations */
3659-
GMT->current.map.frame.draw = true;
3660-
if (axis == GMT_Z) GMT->current.map.frame.drawz = true;
3661+
if (axis == GMT_Z)
3662+
GMT->current.map.frame.drawz = true;
3663+
else
3664+
GMT->current.map.frame.draw = true;
36613665
}
36623666
else
36633667
GMT_Report (GMT->parent, GMT_MSG_ERROR, "Cannot access custom file in -B string %c-component %s\n", str[axis], &in[1]);
@@ -3785,8 +3789,10 @@ GMT_LOCAL int gmtinit_parse4_B_option (struct GMT_CTRL *GMT, char *in) {
37853789

37863790
if (!info[i][0]) continue; /* Skip empty format string */
37873791
if (info[i][0] == '0' && !info[i][1]) { /* Skip format '0' */
3788-
GMT->current.map.frame.draw = true;
3789-
if (i == GMT_Z) GMT->current.map.frame.drawz = true;
3792+
if (i == GMT_Z)
3793+
GMT->current.map.frame.drawz = true;
3794+
else
3795+
GMT->current.map.frame.draw = true;
37903796
continue;
37913797
}
37923798

0 commit comments

Comments
 (0)