|
@@ -90,7 +90,11 @@ class URMRectMeasure extends MeasureItem<URMRectFeature> {
|
|
|
|
|
|
@override
|
|
|
bool onExecuteMouse(PointInfo args) {
|
|
|
+ print("当前 MeasureItem ${this.hashCode} 状态为 ${state}");
|
|
|
if (waitingResult) return false;
|
|
|
+ if (state == ItemStates.running && feature == null) {
|
|
|
+ state = ItemStates.waiting;
|
|
|
+ }
|
|
|
if (state == ItemStates.finished) {
|
|
|
if (args.pointType == PointInfoType.mouseDown) {
|
|
|
state = ItemStates.waiting;
|
|
@@ -123,11 +127,13 @@ class URMRectMeasure extends MeasureItem<URMRectFeature> {
|
|
|
waitingResult = true;
|
|
|
await doCalculateAsync();
|
|
|
doFeatureFinish();
|
|
|
+ doFeatureUpdate(); // 若不执行,子测量将无法自动切换
|
|
|
PromptBox.dismiss();
|
|
|
waitingResult = false;
|
|
|
}
|
|
|
|
|
|
void _recordSharp() {
|
|
|
+ if (feature == null) return;
|
|
|
UrmSharpCopyBoard.recordSharp(
|
|
|
UrmSharpCopyDataType.rect,
|
|
|
[feature!.startPoint, feature!.endPoint],
|
|
@@ -155,7 +161,6 @@ class URMRectMeasure extends MeasureItem<URMRectFeature> {
|
|
|
feature!.hostVisualArea = args.hostVisualArea;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
state = ItemStates.running;
|
|
|
}
|
|
|
}
|