Browse Source

bug no. 3263437

h_vogt 15 years ago
parent
commit
8946a68bf2
  1. 3
      ChangeLog
  2. 14
      src/frontend/wdisp/windisp.c

3
ChangeLog

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

14
src/frontend/wdisp/windisp.c

@ -505,10 +505,9 @@ LRESULT CALLBACK PlotWindowProc( HWND hwnd,
GRAPH * g = pGraph( hwnd); GRAPH * g = pGraph( hwnd);
if (g) { 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) if (g == currentgraph)
currentgraph = FindGraph(g->graphid - 1);
currentgraph = NULL;
DestroyGraph(g->graphid); DestroyGraph(g->graphid);
} }
} }
@ -538,10 +537,15 @@ LRESULT CALLBACK PlotWindowProc( HWND hwnd,
/* switch DC */ /* switch DC */
saveDC = wd->hDC; saveDC = wd->hDC;
wd->hDC = newDC; wd->hDC = newDC;
// currentgraph = g;
/* plot anew */ /* plot anew */
gr_resize(g);
{
GRAPH *tmp = currentgraph;
currentgraph = g;
gr_resize(g);
currentgraph = tmp;
}
/* switch DC */ /* switch DC */
wd->hDC = saveDC; wd->hDC = saveDC;
/* ready */ /* ready */

Loading…
Cancel
Save