The cursor position is now correctly maintained in the HeaderView as well.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6631 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-02-18 12:26:18 +00:00
parent 6a2a85f498
commit b797c2778b
3 changed files with 26 additions and 0 deletions
+18
View File
@@ -530,6 +530,23 @@ void
HeaderView::MessageReceived(BMessage *message)
{
switch (message->what) {
case B_OBSERVER_NOTICE_CHANGE: {
int32 what;
if (message->FindInt32(B_OBSERVE_WHAT_CHANGE, &what) != B_OK)
break;
switch (what) {
case kDataViewCursorPosition:
off_t offset;
if (message->FindInt64("position", &offset) == B_OK) {
fOffset = offset;
UpdateOffsetViews(fPositionSlider->Position());
}
break;
}
break;
}
case kMsgSliderUpdate:
{
off_t position = fPositionSlider->Position();
@@ -642,6 +659,7 @@ void
ProbeView::AttachedToWindow()
{
fEditor.StartWatching(this);
fDataView->StartWatching(fHeaderView, kDataViewCursorPosition);
// Add menu to window