mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
pstats: Fix strip chart scale glitches on Windows when switching collector
This commit is contained in:
parent
65cd882cb2
commit
739ad1ebd6
@ -230,6 +230,23 @@ get_label_tooltip(int collector_index) const {
|
|||||||
return PStatStripChart::get_label_tooltip(collector_index);
|
return PStatStripChart::get_label_tooltip(collector_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the collector represented by this strip chart. This may force a
|
||||||
|
* redraw.
|
||||||
|
*/
|
||||||
|
void WinStatsStripChart::
|
||||||
|
set_collector_index(int collector_index) {
|
||||||
|
if (get_collector_index() != collector_index) {
|
||||||
|
PStatStripChart::set_collector_index(collector_index);
|
||||||
|
|
||||||
|
// Redraw the scale labels.
|
||||||
|
RECT rect;
|
||||||
|
GetClientRect(_window, &rect);
|
||||||
|
rect.left = _right_margin;
|
||||||
|
InvalidateRect(_window, &rect, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the value the height of the vertical axis represents. This may
|
* Changes the value the height of the vertical axis represents. This may
|
||||||
* force a redraw.
|
* force a redraw.
|
||||||
|
@ -46,6 +46,8 @@ public:
|
|||||||
virtual void on_click_label(int collector_index);
|
virtual void on_click_label(int collector_index);
|
||||||
virtual void on_popup_label(int collector_index);
|
virtual void on_popup_label(int collector_index);
|
||||||
virtual std::string get_label_tooltip(int collector_index) const;
|
virtual std::string get_label_tooltip(int collector_index) const;
|
||||||
|
|
||||||
|
void set_collector_index(int collector_index);
|
||||||
void set_vertical_scale(double value_height);
|
void set_vertical_scale(double value_height);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user