diff --git a/uppsrc/HexView/HexView.cpp b/uppsrc/HexView/HexView.cpp index 5eae2f991..eedb323d1 100644 --- a/uppsrc/HexView/HexView.cpp +++ b/uppsrc/HexView/HexView.cpp @@ -233,6 +233,8 @@ void HexView::SetTotal(int64 _total) total = _total; Layout(); SetSb(); + Refresh(); + RefreshInfo(); } void HexView::SetSc(int64 address) @@ -252,6 +254,13 @@ void HexView::Scroll() Refresh(); } +void HexView::RefreshInfo() +{ + info.SetPos(cursor, IsLongMode()); + for(int i = 0; i < 80; i++) + info.Set(i, Byte(cursor + i)); +} + void HexView::SetCursor(int64 _cursor) { cursor = _cursor; @@ -273,9 +282,7 @@ void HexView::SetCursor(int64 _cursor) sc = 0; SetSb(); Refresh(); - info.SetPos(cursor, IsLongMode()); - for(int i = 0; i < 80; i++) - info.Set(i, Byte(cursor + i)); + RefreshInfo(); } void HexView::LeftDown(Point p, dword) diff --git a/uppsrc/HexView/HexView.h b/uppsrc/HexView/HexView.h index 7d7e70d51..b5e62af8b 100644 --- a/uppsrc/HexView/HexView.h +++ b/uppsrc/HexView/HexView.h @@ -59,6 +59,7 @@ private: void SetColumns(int x); void SetInfo(int m); void Goto(); + void RefreshInfo(); public: virtual int Byte(int64 adr);