diff --git a/pandatool/src/win-stats/winStatsGraph.cxx b/pandatool/src/win-stats/winStatsGraph.cxx index 45b5686de8..6ea1504531 100644 --- a/pandatool/src/win-stats/winStatsGraph.cxx +++ b/pandatool/src/win-stats/winStatsGraph.cxx @@ -202,6 +202,11 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { close(); break; + case WM_SIZE: + move_label_stack(); + InvalidateRect(hwnd, NULL, FALSE); + break; + case WM_PAINT: { PAINTSTRUCT ps; @@ -227,7 +232,6 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { // Oops, we need to change the bitmap (and graph) size. changed_graph_size(graph_xsize, graph_ysize); move_graph_window(rect.left, rect.top, graph_xsize, graph_ysize); - move_label_stack(); force_redraw(); } } diff --git a/pandatool/src/win-stats/winStatsStripChart.cxx b/pandatool/src/win-stats/winStatsStripChart.cxx index ac8ab46a16..e1e3f52b72 100644 --- a/pandatool/src/win-stats/winStatsStripChart.cxx +++ b/pandatool/src/win-stats/winStatsStripChart.cxx @@ -338,10 +338,6 @@ static_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { LONG WinStatsStripChart:: window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { switch (msg) { - case WM_SIZE: - InvalidateRect(hwnd, NULL, FALSE); - break; - default: break; }