|  |  | @ -599,21 +599,23 @@ void SignalView::updateState(const QHash<MessageId, CanData> *msgs) { | 
			
		
	
		
		
			
				
					
					|  |  |  |     max_value_width = std::max(max_value_width, fontMetrics().width(item->sig_val)); |  |  |  |     max_value_width = std::max(max_value_width, fontMetrics().width(item->sig_val)); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   QModelIndex top = tree->indexAt(QPoint(0, 0)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   if (top.isValid()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |     // update visible sparkline
 |  |  |  |     // update visible sparkline
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     int first_visible_row = top.parent().isValid() ? top.parent().row() + 1 : top.row(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     int last_visible_row = model->rowCount() - 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     QModelIndex bottom = tree->indexAt(tree->viewport()->rect().bottomLeft()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if (bottom.isValid()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       last_visible_row = bottom.parent().isValid() ? bottom.parent().row() : bottom.row(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     QSize size(tree->columnWidth(1) - delegate->button_size.width(), delegate->button_size.height()); |  |  |  |     QSize size(tree->columnWidth(1) - delegate->button_size.width(), delegate->button_size.height()); | 
			
		
	
		
		
			
				
					
					|  |  |  |     int min_max_width = std::min(size.width() - 10, QFontMetrics(delegate->minmax_font).width("-000.00") + 5); |  |  |  |     int min_max_width = std::min(size.width() - 10, QFontMetrics(delegate->minmax_font).width("-000.00") + 5); | 
			
		
	
		
		
			
				
					
					|  |  |  |     int value_width = std::min<int>(max_value_width, size.width() * 0.35); |  |  |  |     int value_width = std::min<int>(max_value_width, size.width() * 0.35); | 
			
		
	
		
		
			
				
					
					|  |  |  |     size -= {value_width + min_max_width, style()->pixelMetric(QStyle::PM_FocusFrameVMargin) * 2}; |  |  |  |     size -= {value_width + min_max_width, style()->pixelMetric(QStyle::PM_FocusFrameVMargin) * 2}; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   QModelIndex top = tree->indexAt(QPoint(0, 0)); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   QModelIndex bottom = tree->indexAt(tree->viewport()->rect().bottomLeft()); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   int start_row = top.parent().isValid() ? top.parent().row() + 1 : top.row(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   int end_row = model->rowCount() - 1; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   if (bottom.isValid()) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     end_row = bottom.parent().isValid() ? bottom.parent().row() : bottom.row(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     QFutureSynchronizer<void> synchronizer; |  |  |  |     QFutureSynchronizer<void> synchronizer; | 
			
		
	
		
		
			
				
					
					|  |  |  |   for (int i = start_row; i <= end_row; ++i) { |  |  |  |     for (int i = first_visible_row; i <= last_visible_row; ++i) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       auto item = model->getItem(model->index(i, 1)); |  |  |  |       auto item = model->getItem(model->index(i, 1)); | 
			
		
	
		
		
			
				
					
					|  |  |  |       auto &s = item->sparkline; |  |  |  |       auto &s = item->sparkline; | 
			
		
	
		
		
			
				
					
					|  |  |  |       if (s.last_ts != last_msg.ts || s.size() != size || s.time_range != settings.sparkline_range) { |  |  |  |       if (s.last_ts != last_msg.ts || s.size() != size || s.time_range != settings.sparkline_range) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -621,7 +623,7 @@ void SignalView::updateState(const QHash<MessageId, CanData> *msgs) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             &s, &Sparkline::update, model->msg_id, item->sig, last_msg.ts, settings.sparkline_range, size)); |  |  |  |             &s, &Sparkline::update, model->msg_id, item->sig, last_msg.ts, settings.sparkline_range, size)); | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |   synchronizer.waitForFinished(); |  |  |  |   } | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   for (int i = 0; i < model->rowCount(); ++i) { |  |  |  |   for (int i = 0; i < model->rowCount(); ++i) { | 
			
		
	
		
		
			
				
					
					|  |  |  |     emit model->dataChanged(model->index(i, 1), model->index(i, 1), {Qt::DisplayRole}); |  |  |  |     emit model->dataChanged(model->index(i, 1), model->index(i, 1), {Qt::DisplayRole}); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |