a bunch of ListView fixes:

* removed weird stuff that seemed to have no purpose in life
* added more comments where I had to figure things out
* fWidth is now adjusted in FrameResized()
* ListView scrolls up when items are removed at the end and
  there would be empty room
* fixed SwapItems(), MoveItem() and ReplaceItem() by making
  DoMiscellaneous() use the private implementations instead
  of calling the public ones again resulting in an endless
  loop
* renamed private methods with underscore
* removed more unused/empty private methods
* some slight performance increases here and there
* more correct tracking of fFirstSelected and fLastSelected,
  at least I cannot reproduce one crash in the WonderBrush
  Layer list anymore

even more cleanup and testing would not hurt though...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17487 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2006-05-17 00:12:14 +00:00
parent c1a34c9be2
commit a2a6a329e8
2 changed files with 136 additions and 82 deletions
+4 -6
View File
@@ -165,12 +165,10 @@ class BListView : public BView, public BInvoker
int32 _CalcLastSelected(int32 before);
virtual void DrawItem(BListItem *item, BRect itemRect, bool complete = false);
bool DoSwapItems(int32 a, int32 b);
bool DoMoveItem(int32 from, int32 to);
bool DoReplaceItem(int32 index, BListItem *item);
void RescanSelection(int32 from, int32 to);
void DoMouseUp(BPoint where);
void DoMouseMoved(BPoint where);
bool _SwapItems(int32 a, int32 b);
bool _MoveItem(int32 from, int32 to);
bool _ReplaceItem(int32 index, BListItem *item);
void _RescanSelection(int32 from, int32 to);
BList fList;
list_view_type fListType;