Only updates the block position view when searching is in progress.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6791 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-02-28 04:21:19 +00:00
parent 995924c2ed
commit 3f7c1872fa
+7 -5
View File
@@ -126,7 +126,7 @@ class HeaderView : public BView, public BInvoker {
private: private:
void FormatValue(char *buffer, size_t bufferSize, off_t value); void FormatValue(char *buffer, size_t bufferSize, off_t value);
void UpdatePositionViews(); void UpdatePositionViews(bool all = true);
void UpdateOffsetViews(bool all = true); void UpdateOffsetViews(bool all = true);
void UpdateFileSizeView(); void UpdateFileSizeView();
void NotifyTarget(); void NotifyTarget();
@@ -602,14 +602,16 @@ HeaderView::FormatValue(char *buffer, size_t bufferSize, off_t value)
void void
HeaderView::UpdatePositionViews() HeaderView::UpdatePositionViews(bool all)
{ {
char buffer[64]; char buffer[64];
FormatValue(buffer, sizeof(buffer), fPosition / fBlockSize); FormatValue(buffer, sizeof(buffer), fPosition / fBlockSize);
fPositionControl->SetText(buffer); fPositionControl->SetText(buffer);
FormatValue(buffer, sizeof(buffer), fPosition + fOffset); if (all) {
fFileOffsetView->SetText(buffer); FormatValue(buffer, sizeof(buffer), fPosition + fOffset);
fFileOffsetView->SetText(buffer);
}
} }
@@ -740,7 +742,7 @@ HeaderView::MessageReceived(BMessage *message)
// round to block size // round to block size
// update views // update views
UpdatePositionViews(); UpdatePositionViews(false);
fPositionSlider->SetPosition(fPosition); fPositionSlider->SetPosition(fPosition);
break; break;
} }