BColumnListView: Avoid crash on column resize.
* Inizialize fSelectedColumn before calling ResizeSelectedColumn(). * Fixes #10439.
This commit is contained in:
parent
e0bf43c16b
commit
5a7c64f90a
@ -2739,6 +2739,9 @@ TitleView::MouseDown(BPoint position)
|
|||||||
&& (fColumnFlags & B_ALLOW_COLUMN_RESIZE) != 0) {
|
&& (fColumnFlags & B_ALLOW_COLUMN_RESIZE) != 0) {
|
||||||
|
|
||||||
int32 clicks = 0;
|
int32 clicks = 0;
|
||||||
|
fSelectedColumn = column;
|
||||||
|
fSelectedColumnRect.Set(leftEdge, 0, rightEdge,
|
||||||
|
fVisibleRect.Height());
|
||||||
Window()->CurrentMessage()->FindInt32("clicks", &clicks);
|
Window()->CurrentMessage()->FindInt32("clicks", &clicks);
|
||||||
if (clicks == 2 || buttons == B_TERTIARY_MOUSE_BUTTON) {
|
if (clicks == 2 || buttons == B_TERTIARY_MOUSE_BUTTON) {
|
||||||
ResizeSelectedColumn(position, true);
|
ResizeSelectedColumn(position, true);
|
||||||
@ -2746,9 +2749,6 @@ TitleView::MouseDown(BPoint position)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fCurrentState = RESIZING_COLUMN;
|
fCurrentState = RESIZING_COLUMN;
|
||||||
fSelectedColumn = column;
|
|
||||||
fSelectedColumnRect.Set(leftEdge, 0, rightEdge,
|
|
||||||
fVisibleRect.Height());
|
|
||||||
fClickPoint = BPoint(position.x - rightEdge - 1,
|
fClickPoint = BPoint(position.x - rightEdge - 1,
|
||||||
position.y - fSelectedColumnRect.top);
|
position.y - fSelectedColumnRect.top);
|
||||||
SetMouseEventMask(B_POINTER_EVENTS,
|
SetMouseEventMask(B_POINTER_EVENTS,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user