From 3f7c1872fa79c7b46d4edfa526b2f90ccd84464d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 28 Feb 2004 04:21:19 +0000 Subject: [PATCH] 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 --- src/apps/diskprobe/ProbeView.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/apps/diskprobe/ProbeView.cpp b/src/apps/diskprobe/ProbeView.cpp index a3ee225aa5..07b96f0c1d 100644 --- a/src/apps/diskprobe/ProbeView.cpp +++ b/src/apps/diskprobe/ProbeView.cpp @@ -126,7 +126,7 @@ class HeaderView : public BView, public BInvoker { private: void FormatValue(char *buffer, size_t bufferSize, off_t value); - void UpdatePositionViews(); + void UpdatePositionViews(bool all = true); void UpdateOffsetViews(bool all = true); void UpdateFileSizeView(); void NotifyTarget(); @@ -602,14 +602,16 @@ HeaderView::FormatValue(char *buffer, size_t bufferSize, off_t value) void -HeaderView::UpdatePositionViews() +HeaderView::UpdatePositionViews(bool all) { char buffer[64]; FormatValue(buffer, sizeof(buffer), fPosition / fBlockSize); fPositionControl->SetText(buffer); - FormatValue(buffer, sizeof(buffer), fPosition + fOffset); - fFileOffsetView->SetText(buffer); + if (all) { + FormatValue(buffer, sizeof(buffer), fPosition + fOffset); + fFileOffsetView->SetText(buffer); + } } @@ -740,7 +742,7 @@ HeaderView::MessageReceived(BMessage *message) // round to block size // update views - UpdatePositionViews(); + UpdatePositionViews(false); fPositionSlider->SetPosition(fPosition); break; }