Fix for Qt hex editor viewport getting out of sync with vertical scroll bar. Force line offset to come directly from scroll bar value during paint event. Issue #450
This commit is contained in:
parent
41df815cf6
commit
91e530aa99
|
@ -1564,23 +1564,27 @@ void HexEditorDialog_t::vbarMoved(int value)
|
|||
{
|
||||
//printf("VBar Moved: %i\n", value);
|
||||
editor->setLine( value );
|
||||
editor->update();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void HexEditorDialog_t::vbarChanged(int value)
|
||||
{
|
||||
//printf("VBar Changed: %i\n", value);
|
||||
editor->setLine( value );
|
||||
editor->update();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void HexEditorDialog_t::hbarChanged(int value)
|
||||
{
|
||||
//printf("HBar Changed: %i\n", value);
|
||||
editor->setHorzScroll( value );
|
||||
editor->update();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void HexEditorDialog_t::gotoAddress( int newAddr )
|
||||
{
|
||||
editor->setAddr( newAddr );
|
||||
editor->update();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void HexEditorDialog_t::saveRomFile(void)
|
||||
|
@ -3731,6 +3735,9 @@ void QHexEdit::paintEvent(QPaintEvent *event)
|
|||
{
|
||||
maxLineOffset = 0;
|
||||
}
|
||||
vbar->setMaximum( maxLineOffset );
|
||||
|
||||
lineOffset = vbar->value();
|
||||
|
||||
if ( lineOffset < 0 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue