Hello,
in the last version 6.3.x all works fine.
When i use this simple code:
procedure Tfmain.Button3Click(Sender: TObject);
begin
ImageEnView1.SaveSelection;
ImageEnView1.LayersCreateFromSelection;
ImageEnView1.RestoreSelection;
end;
Now in v7.0 i can not restore the selection.
Only without .LayersCreateFromSelection;
works ok.
With .LayersCreateFromSelection; nothing ??
By the last version 6.x.x It's OK ?
Can you help my.
I have checked Restoreselection,
but fSavedSelection.Count = 0 ??? Why ?
I have saveselection befor layerscreatefromselecton.
ImageEnVIew1.RestoreSelection; // reload 10,10,100,100
!!}
function TImageEnView.RestoreSelection(Remove: Boolean; Options: TIERSOptions): boolean;
var
ms: TMemoryStream;
begin
result := false;
if fSavedSelection.Count > 0 then
begin
ms := fSavedSelection[fSavedSelection.Count - 1];
ms.Position := 0;
result := LoadSelectionFromStream(ms, Options);
if Remove then
begin
fSavedSelection.Delete(fSavedSelection.Count - 1);
FreeAndNil(ms);
end;
end;
end;
Regards
Klaus
Klaus
www.klausdoege.de