|
@@ -2586,6 +2586,7 @@ begin
|
|
|
UpdateSelection(FSelectionType, true);
|
|
|
end;
|
|
|
dtDefault, dtNone:
|
|
|
+ if FDrawGrid.MouseToGridZone(X, Y) = gzNormal then
|
|
|
case Button of
|
|
|
mbLeft: UpdateSelection(FSelectionType, true);
|
|
|
end;
|
|
@@ -2672,8 +2673,16 @@ begin
|
|
|
|
|
|
if not SelectionsEquals(FLastSelectionEvent, LSelection) then
|
|
|
begin
|
|
|
- FOnSelection(Self, LSelection);
|
|
|
+ FIgnoreSelectionEvent := true;
|
|
|
FLastSelectionEvent := LSelection;
|
|
|
+ FOnSelection(Self, LSelection);
|
|
|
+ // maybe inside FOnSelection was called ClearSelection, we can handle this
|
|
|
+ if not SelectionsEquals(FLastSelection, LSelection) then
|
|
|
+ begin
|
|
|
+ FLastSelectionEvent := FLastSelection;
|
|
|
+ FOnSelection(Self, FLastSelection);
|
|
|
+ end;
|
|
|
+ FIgnoreSelectionEvent := false;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|