Modified the "plot svg" command to remove the window trimmings
(scrollbar, title bar, etc.) from the output if the command is called from the non-GUI-wrapper environment (where the border area is part of the rendered output). This was required due to an unsolved bug in which calling magic to write SVG output from the wrapper in some pathological case exposed a Tk bug that caused the Tk grid manager to infinite loop, filling memory without limit.
This commit is contained in:
parent
6812e7cd10
commit
52dadcff08
|
|
@ -98,6 +98,7 @@ CmdPlot(w, cmd)
|
|||
int iwidth, scale;
|
||||
|
||||
#ifdef HAVE_LIBCAIRO
|
||||
int flags;
|
||||
extern void GrTCairoPlotSVG();
|
||||
#endif
|
||||
|
||||
|
|
@ -271,7 +272,13 @@ CmdPlot(w, cmd)
|
|||
cmdPlotOption[PLOTSVG]);
|
||||
return;
|
||||
}
|
||||
flags = window->w_flags;
|
||||
/* In case this is called from a non-GUI wrapper window, remove */
|
||||
/* the window border widgets from the rendered display. */
|
||||
window->w_flags &= ~(WIND_SCROLLABLE | WIND_SCROLLBARS | WIND_CAPTION
|
||||
| WIND_BORDER);
|
||||
GrTCairoPlotSVG(cmd->tx_argv[2], window);
|
||||
window->w_flags = flags;
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue