bug no. 3263437

This commit is contained in:
h_vogt 2011-05-23 21:46:13 +00:00
parent 5dd55910c7
commit 8946a68bf2
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,6 @@
2011-05-23 Holger Vogt
* windisp.c: bug no. 3263437 (fix thanks to Robert)
2011-05-22 Robert Larice
* configure.ac ,
* src/spicelib/devices/Makefile.am :

View File

@ -505,10 +505,9 @@ LRESULT CALLBACK PlotWindowProc( HWND hwnd,
GRAPH * g = pGraph( hwnd);
if (g) {
/* if g equals currentgraph, set a new currentgraph.
Otherwise gr_resize(g) might fail. */
/* if g equals currentgraph, reset currentgraph. */
if (g == currentgraph)
currentgraph = FindGraph(g->graphid - 1);
currentgraph = NULL;
DestroyGraph(g->graphid);
}
}
@ -538,10 +537,15 @@ LRESULT CALLBACK PlotWindowProc( HWND hwnd,
/* switch DC */
saveDC = wd->hDC;
wd->hDC = newDC;
// currentgraph = g;
/* plot anew */
gr_resize(g);
{
GRAPH *tmp = currentgraph;
currentgraph = g;
gr_resize(g);
currentgraph = tmp;
}
/* switch DC */
wd->hDC = saveDC;
/* ready */