Now also send a selection update notice if the contents have changed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6745 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7e55eac336
commit
b607d18b74
@ -103,7 +103,8 @@ DataView::UpdateFromEditor(BMessage *message)
|
||||
if (fData == NULL)
|
||||
return;
|
||||
|
||||
if (fEditor.Lock()) {
|
||||
BAutolock locker(fEditor);
|
||||
|
||||
fFileSize = fEditor.FileSize();
|
||||
|
||||
// get the range of the changes
|
||||
@ -138,6 +139,14 @@ DataView::UpdateFromEditor(BMessage *message)
|
||||
fEditor.Unlock();
|
||||
|
||||
InvalidateRange(start, end);
|
||||
|
||||
// we notify our selection listeners also if the
|
||||
// data in the selection has changed
|
||||
if (start <= fEnd && end >= fStart) {
|
||||
BMessage update;
|
||||
update.AddInt64("start", fStart);
|
||||
update.AddInt64("end", fEnd);
|
||||
SendNotices(kDataViewSelection, &update);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user