Răsfoiți Sursa

pstats: Fix erroneous highlight in strip chart before oldest frame

rdb 2 ani în urmă
părinte
comite
577dc25130
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      pandatool/src/pstatserver/pStatStripChart.cxx

+ 4 - 0
pandatool/src/pstatserver/pStatStripChart.cxx

@@ -229,6 +229,10 @@ get_collector_under_pixel(int xpoint, int ypoint) {
   // Now use that time to determine the frame.
   // Now use that time to determine the frame.
   const PStatThreadData *thread_data = _view.get_thread_data();
   const PStatThreadData *thread_data = _view.get_thread_data();
 
 
+  if (time < thread_data->get_oldest_time()) {
+    return -1;
+  }
+
   // And now we can determine which collector within the frame, based on the
   // And now we can determine which collector within the frame, based on the
   // value height.
   // value height.
   if (_average_mode) {
   if (_average_mode) {