plot window handling
This commit is contained in:
parent
bea58219e7
commit
95a68aae48
|
|
@ -1,3 +1,6 @@
|
|||
2009-01-10 Holger Vogt
|
||||
* windisp.c: improve plot window handling, still not yet perfect
|
||||
|
||||
2009-01-09 Dietmar Warning
|
||||
* src/misc/alloc.c, src/frontend/outitf.c: heap only needed under windows for zoom
|
||||
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ LRESULT CALLBACK PlotWindowProc( HWND hwnd,
|
|||
|
||||
if (!eq(plot_cur->pl_typename, buf2)) {
|
||||
(void) sprintf(buf,
|
||||
"setplot %s; %s xlimit %1.20e %1.20e ylimit %1.20e %1.20e; setplot $curplot\n",
|
||||
"setplot %s; %s xlimit %e %e ylimit %e %e; setplot $curplot\n",
|
||||
buf2, gr->commandline, fx0, fxe, fy0, fye);
|
||||
} else {
|
||||
(void) sprintf(buf, "%s xlimit %e %e ylimit %e %e\n",
|
||||
|
|
@ -407,8 +407,14 @@ LRESULT CALLBACK PlotWindowProc( HWND hwnd,
|
|||
case WM_CLOSE: /* close window */
|
||||
{
|
||||
GRAPH * g = pGraph( hwnd);
|
||||
if (g)
|
||||
|
||||
if (g) {
|
||||
/* if g equals currentgraph, set a new currentgraph.
|
||||
Otherwise gr_resize(g) might fail. */
|
||||
if (g == currentgraph)
|
||||
currentgraph = FindGraph(g->graphid - 1);
|
||||
DestroyGraph(g->graphid);
|
||||
}
|
||||
}
|
||||
goto WIN_DEFAULT;
|
||||
|
||||
|
|
@ -436,6 +442,8 @@ LRESULT CALLBACK PlotWindowProc( HWND hwnd,
|
|||
/* switch DC */
|
||||
saveDC = wd->hDC;
|
||||
wd->hDC = newDC;
|
||||
// currentgraph = g;
|
||||
|
||||
/* plot anew */
|
||||
gr_resize(g);
|
||||
/* switch DC */
|
||||
|
|
|
|||
Loading…
Reference in New Issue