]> sigrok.org Git - pulseview.git/commitdiff
QHexView: Fix cursor max pos
authorSoeren Apel <redacted>
Thu, 12 Dec 2019 11:58:59 +0000 (12:58 +0100)
committerSoeren Apel <redacted>
Thu, 12 Dec 2019 11:58:59 +0000 (12:58 +0100)
pv/views/decoder_output/QHexView.cpp

index 586a5cdac373da49b36515b1903349c7500e1d5a..a4e71f5c458c8bdab060d0e37fc79982977e07b6 100644 (file)
@@ -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;