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
|
||||
// was registered since.
|
||||
fLastClickedTime = 0;
|
||||
fParams.poseView->SetTextWidgetToCheck(NULL);
|
||||
StartEdit(fParams.bounds, fParams.poseView, fParams.pose);
|
||||
}
|
||||
} else {
|
||||
@@ -335,7 +334,8 @@ TextViewFilter(BMessage* message, BHandler**, BMessageFilter* filter)
|
||||
void
|
||||
BTextWidget::StartEdit(BRect bounds, BPoseView* view, BPose* pose)
|
||||
{
|
||||
if (!IsEditable())
|
||||
view->SetTextWidgetToCheck(NULL, this);
|
||||
if (!IsEditable() || IsActive())
|
||||
return;
|
||||
|
||||
BEntry entry(pose->TargetModel()->EntryRef());
|
||||
|
||||
Reference in New Issue
Block a user