Tracker: Prevent TextWidget to start editing twice
It was possible to confuse TextWidget to start editing twice (clicking on the widget and during the wait, pressing F2) and confusing the states of the TextWidget.
This commit is contained in:
@@ -234,7 +234,6 @@ BTextWidget::CheckExpiration()
|
|||||||
// at least 'doubleClickSpeed' microseconds ellapsed and no click
|
// at least 'doubleClickSpeed' microseconds ellapsed and no click
|
||||||
// was registered since.
|
// was registered since.
|
||||||
fLastClickedTime = 0;
|
fLastClickedTime = 0;
|
||||||
fParams.poseView->SetTextWidgetToCheck(NULL);
|
|
||||||
StartEdit(fParams.bounds, fParams.poseView, fParams.pose);
|
StartEdit(fParams.bounds, fParams.poseView, fParams.pose);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -335,7 +334,8 @@ TextViewFilter(BMessage* message, BHandler**, BMessageFilter* filter)
|
|||||||
void
|
void
|
||||||
BTextWidget::StartEdit(BRect bounds, BPoseView* view, BPose* pose)
|
BTextWidget::StartEdit(BRect bounds, BPoseView* view, BPose* pose)
|
||||||
{
|
{
|
||||||
if (!IsEditable())
|
view->SetTextWidgetToCheck(NULL, this);
|
||||||
|
if (!IsEditable() || IsActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BEntry entry(pose->TargetModel()->EntryRef());
|
BEntry entry(pose->TargetModel()->EntryRef());
|
||||||
|
|||||||
Reference in New Issue
Block a user