diff --git a/applications/lazimageeditor/lazimageeditor.lpi b/applications/lazimageeditor/lazimageeditor.lpi
index c388327a9..e7d12773e 100644
--- a/applications/lazimageeditor/lazimageeditor.lpi
+++ b/applications/lazimageeditor/lazimageeditor.lpi
@@ -58,10 +58,11 @@
+
-
-
+
+
@@ -69,11 +70,10 @@
-
-
-
+
+
@@ -444,127 +444,123 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
diff --git a/applications/lazimageeditor/main.pas b/applications/lazimageeditor/main.pas
index 113234f7d..33d39c319 100644
--- a/applications/lazimageeditor/main.pas
+++ b/applications/lazimageeditor/main.pas
@@ -863,6 +863,7 @@ begin
YY1 := 0;
YY2 := 0;
end;
+ ActivePictureEdit.pcount := 0;
ActivePictureEdit.Tool := Tool;
UpdateToolSettings;
ToolBarToolsClick(nil);
diff --git a/applications/lazimageeditor/picturectrls.pas b/applications/lazimageeditor/picturectrls.pas
index d1519552c..c259a6926 100644
--- a/applications/lazimageeditor/picturectrls.pas
+++ b/applications/lazimageeditor/picturectrls.pas
@@ -152,7 +152,6 @@ type
protected
FromColor, ToColor: TColor;
paddr: array of TPoint;
- pcount: integer;
procedure Change; dynamic;
procedure ColorChange; dynamic;
procedure PictureSizeChange; dynamic;
@@ -165,6 +164,7 @@ type
function GetToolDrag: TPictureEditToolDrag; virtual;
procedure DrawToolDrag(X1, Y1, X2, Y2: integer); virtual;
public
+ pcount: integer;
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;