ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 RestoreSelection in v7.0
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

klausdoege

Germany
389 Posts

Posted - Jun 13 2017 :  09:43:00  Show Profile  Reply
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

xequte

38615 Posts

Posted - Jun 13 2017 :  21:43:28  Show Profile  Reply
Hi Klaus

I'm afraid this is an issue in 7.0.0. Please email me for a fix.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: