The HeaderView now checks the position before it propagates it for kMsgPositionUpdate.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6764 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -690,6 +690,11 @@ HeaderView::MessageReceived(BMessage *message)
|
||||
fPosition = (fPosition / fBlockSize) * fBlockSize;
|
||||
// round to block size
|
||||
|
||||
if (fPosition < 0)
|
||||
fPosition = 0;
|
||||
else if (fPosition > ((fFileSize - 1) / fBlockSize) * fBlockSize)
|
||||
fPosition = ((fFileSize - 1) / fBlockSize) * fBlockSize;
|
||||
|
||||
// update views
|
||||
UpdatePositionViews();
|
||||
fPositionSlider->SetPosition(fPosition);
|
||||
|
||||
Reference in New Issue
Block a user