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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 RestoreSelection in v7.0

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
klausdoege Posted - Jun 13 2017 : 09:43:00
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 13 2017 : 21:43:28
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