When initially starting filtering we need to make sure that non-matching poses
fall out of the selection. The same is later done when removing them from the matching subset, so moved that to a common EnsurePoseUnselected(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35345 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9607,7 +9607,7 @@ BPoseView::SetWidgetTextOutline(bool on)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BPoseView::RemoveFilteredPose(BPose *pose, int32 index)
|
BPoseView::EnsurePoseUnselected(BPose *pose)
|
||||||
{
|
{
|
||||||
if (pose == fDropTarget)
|
if (pose == fDropTarget)
|
||||||
fDropTarget = NULL;
|
fDropTarget = NULL;
|
||||||
@@ -9626,7 +9626,13 @@ BPoseView::RemoveFilteredPose(BPose *pose, int32 index)
|
|||||||
if (fSelectionChangedHook)
|
if (fSelectionChangedHook)
|
||||||
ContainerWindow()->SelectionChanged();
|
ContainerWindow()->SelectionChanged();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BPoseView::RemoveFilteredPose(BPose *pose, int32 index)
|
||||||
|
{
|
||||||
|
EnsurePoseUnselected(pose);
|
||||||
fFilteredPoseList->RemoveItemAt(index);
|
fFilteredPoseList->RemoveItemAt(index);
|
||||||
|
|
||||||
BRect invalidRect = CalcPoseRectList(pose, index);
|
BRect invalidRect = CalcPoseRectList(pose, index);
|
||||||
@@ -9744,6 +9750,8 @@ BPoseView::StartFiltering()
|
|||||||
BPose *pose = fPoseList->ItemAt(i);
|
BPose *pose = fPoseList->ItemAt(i);
|
||||||
if (FilterPose(pose))
|
if (FilterPose(pose))
|
||||||
fFilteredPoseList->AddItem(pose);
|
fFilteredPoseList->AddItem(pose);
|
||||||
|
else
|
||||||
|
EnsurePoseUnselected(pose);
|
||||||
}
|
}
|
||||||
|
|
||||||
Invalidate();
|
Invalidate();
|
||||||
|
|||||||
@@ -613,6 +613,7 @@ class BPoseView : public BView {
|
|||||||
bool IsValidAddPosesThread(thread_id) const;
|
bool IsValidAddPosesThread(thread_id) const;
|
||||||
|
|
||||||
// filtering
|
// filtering
|
||||||
|
void EnsurePoseUnselected(BPose *pose);
|
||||||
void RemoveFilteredPose(BPose *pose, int32 index);
|
void RemoveFilteredPose(BPose *pose, int32 index);
|
||||||
void FilterChanged();
|
void FilterChanged();
|
||||||
void UpdateAfterFilterChange();
|
void UpdateAfterFilterChange();
|
||||||
|
|||||||
Reference in New Issue
Block a user