hardcopy button error removed
This commit is contained in:
parent
7dc6417e6d
commit
dc7d2d01a2
|
|
@ -1,4 +1,7 @@
|
||||||
2010-01-01 Holger Vogt
|
2010-01-02 Holger Vogt
|
||||||
|
* x11.c: hardcopy by button click, error removed
|
||||||
|
|
||||||
|
2010-01-02 Holger Vogt
|
||||||
* winmain.c: internal system() no longer needed, its available
|
* winmain.c: internal system() no longer needed, its available
|
||||||
in mingw and MS Visual Studio.
|
in mingw and MS Visual Studio.
|
||||||
gnuplot.c: small update, call to gnuplot tested up to ver. 4.2.6,
|
gnuplot.c: small update, call to gnuplot tested up to ver. 4.2.6,
|
||||||
|
|
|
||||||
|
|
@ -410,7 +410,7 @@ X11_NewViewport(GRAPH *graph)
|
||||||
XtAddCallback(DEVDEP(graph).buttons[1], XtNcallback, (XtCallbackProc) hardcopy, graph);
|
XtAddCallback(DEVDEP(graph).buttons[1], XtNcallback, (XtCallbackProc) hardcopy, graph);
|
||||||
|
|
||||||
/* set up fonts */
|
/* set up fonts */
|
||||||
if (!cp_getvar("xfont", VT_STRING, fontname)) {
|
if (!cp_getvar("font", VT_STRING, fontname)) {
|
||||||
(void) strcpy(fontname, DEF_FONT);
|
(void) strcpy(fontname, DEF_FONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -830,10 +830,25 @@ zoomin(GRAPH *graph)
|
||||||
void
|
void
|
||||||
hardcopy(Widget w, caddr_t client_data, caddr_t call_data)
|
hardcopy(Widget w, caddr_t client_data, caddr_t call_data)
|
||||||
{
|
{
|
||||||
|
X11devdep tempdevdep;
|
||||||
|
Bool hasdevdep = FALSE;
|
||||||
|
/* com_hardcopy() -> gr_resize() -> setcolor() dirung postscript
|
||||||
|
printing will act on currentgraph with a DEVDEP inherited from PSdevdep.
|
||||||
|
But currentgraph had not changed its devdep, which was derived from
|
||||||
|
incompatible X11devdep, thus overwriting some variables. Here you find a
|
||||||
|
temporary remedy, until there will be a cleanup of graph handling. E.g.
|
||||||
|
CopyGraph() does not make a copy of its devdep, but just copies the pointer,
|
||||||
|
so keeping the old devdep. */
|
||||||
|
if (currentgraph->devdep) {
|
||||||
|
tempdevdep = DEVDEP(currentgraph);
|
||||||
|
hasdevdep = TRUE;
|
||||||
|
}
|
||||||
lasthardcopy = (GRAPH *) client_data;
|
lasthardcopy = (GRAPH *) client_data;
|
||||||
com_hardcopy(NULL);
|
com_hardcopy(NULL);
|
||||||
|
if (hasdevdep)
|
||||||
|
DEVDEP(currentgraph) = tempdevdep;
|
||||||
|
else
|
||||||
|
currentgraph->devdep = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue