From: Soeren Apel Date: Thu, 12 Dec 2019 11:58:59 +0000 (+0100) Subject: QHexView: Fix cursor max pos X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b605e3c3816859a6fe3048bf25dbc93fe40306f2;p=pulseview.git QHexView: Fix cursor max pos --- diff --git a/pv/views/decoder_output/QHexView.cpp b/pv/views/decoder_output/QHexView.cpp index 586a5cda..a4e71f5c 100644 --- a/pv/views/decoder_output/QHexView.cpp +++ b/pv/views/decoder_output/QHexView.cpp @@ -493,11 +493,8 @@ void QHexView::setCursorPos(int position) position = 0; int maxPos = 0; - if (data_) { + if (data_) maxPos = data_->count() * 2; - if (data_->count() % BYTES_PER_LINE) - maxPos++; - } if (position > maxPos) position = maxPos;