Преглед изворни кода

show message when auto-resampling big image

circular17 пре 5 година
родитељ
комит
136e5a2441
1 измењених фајлова са 7 додато и 2 уклоњено
  1. 7 2
      lazpaint/image/uimage.pas

+ 7 - 2
lazpaint/image/uimage.pas

@@ -37,6 +37,7 @@ type
 
 
   TLazPaintImage = class
   TLazPaintImage = class
   private
   private
+    FLazPaintInstance: TObject;
     FActionInProgress: TCustomLayerAction;
     FActionInProgress: TCustomLayerAction;
     FOnActionProgress: TLayeredActionProgressEvent;
     FOnActionProgress: TLayeredActionProgressEvent;
     FOnSelectedLayerIndexChanging: TOnCurrentLayerIndexChanged;
     FOnSelectedLayerIndexChanging: TOnCurrentLayerIndexChanged;
@@ -295,7 +296,7 @@ type
     property IsTiff: boolean read GetIsTiff;
     property IsTiff: boolean read GetIsTiff;
     property IsGif: boolean read GetIsGif;
     property IsGif: boolean read GetIsGif;
     property DPI: integer read GetDPI;
     property DPI: integer read GetDPI;
-    constructor Create;
+    constructor Create(ALazPaintInstance: TObject);
     destructor Destroy; override;
     destructor Destroy; override;
   end;
   end;
 
 
@@ -713,7 +714,10 @@ begin
             layeredBmp.Free;
             layeredBmp.Free;
             layeredBmp := temp;
             layeredBmp := temp;
           end;
           end;
+          MessagePopupForever(rsResamplingImage);
+          (FLazPaintInstance as TLazPaintCustomInstance).UpdateWindows;
           (layeredBmp as TBGRALayeredBitmap).Resample(cx, cy, rmFineResample);
           (layeredBmp as TBGRALayeredBitmap).Resample(cx, cy, rmFineResample);
+          MessagePopupHide;
         end;
         end;
       CursorHotSpot := Point(0,0);
       CursorHotSpot := Point(0,0);
       if layeredBmp is TBGRALazPaintImage then
       if layeredBmp is TBGRALazPaintImage then
@@ -2326,8 +2330,9 @@ begin
   exit(-1);
   exit(-1);
 end;
 end;
 
 
-constructor TLazPaintImage.Create;
+constructor TLazPaintImage.Create(ALazPaintInstance: TObject);
 begin
 begin
+  FLazPaintInstance := ALazPaintInstance;
   FCurrentState := TImageState.Create;
   FCurrentState := TImageState.Create;
   FCurrentState.OnOriginalChange:= @OriginalChange;
   FCurrentState.OnOriginalChange:= @OriginalChange;
   FCurrentState.OnOriginalEditingChange:= @OriginalEditingChange;
   FCurrentState.OnOriginalEditingChange:= @OriginalEditingChange;