Git Product home page Git Product logo

Comments (6)

audetto avatar audetto commented on July 17, 2024

It has something to do with another QT window below the Hex Viewer.
But it was not happening before at 2ad23ee.
Is the hex window fully repainted every time?

from qhexview.

audetto avatar audetto commented on July 17, 2024

Bisection points to this: d26bd46.

from qhexview.

audetto avatar audetto commented on July 17, 2024

It looks to be an off-by-one (or similar) around this logic

https://github.com/Dax89/QHexView/blob/master/qhexview.cpp#L249

It is not redrawing all necessary lines.

from qhexview.

audetto avatar audetto commented on July 17, 2024
    const int lineHeight = m_renderer->lineHeight();
    const qint64 first = firstvisible + std::max(0, (r.top() / lineHeight) - 1);
    const qint64 last = firstvisible + (r.bottom() / lineHeight) + 1;
    int count = static_cast<int>((last - first) + 1);

This fixes it, but I cannot yet pinpoint to the exact error.

from qhexview.

audetto avatar audetto commented on July 17, 2024

Here it is

    const quint64 firstVisible = this->firstVisibleLine();
    const int lineHeight = m_renderer->lineHeight();
    const int headerCount = m_renderer->headerLineCount();

    const int first = std::max(0, (r.top() / lineHeight) - headerCount);  // because all lines are moved down by header
    const int last = (r.bottom()  + lineHeight - 1) / lineHeight;  // round up for fractional line
    const int count = (last - first) + 1;

    m_renderer->render(&painter, firstVisible + first, count, firstVisible);

Will provide a PR.

from qhexview.

audetto avatar audetto commented on July 17, 2024

#42

from qhexview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.