Author |
Topic  |
|
nwscomps
  
190 Posts |
Posted - Sep 15 2018 : 11:51:02
|
In my code I have: fCurrentIEView.LayersRemove(fCurrentIEView.LayersCurrent);
and in another part:
fCurrentIEView.LayersCurrent := fCurrentIEView.LayersAdd; fCurrentIEView.IO.LoadFromFile(OpenImageEnDialog1.FileName); fCurrentIEView.Update;
Both these codes do not trigger the OnLayerNotifyEx to notify both the deleteion and the creation of layers. The notification I get only with mouseover, selected, moved, resized, etc.. This happens with latest version of Imageen. Can you reproduce? Thanks
Francesco Savastano Nwscomps.com Add-ons for the ImageEn Library |
|
klausdoege
  
Germany
389 Posts |
Posted - Sep 15 2018 : 11:59:28
|
Hi Francesco, OnLayerNotifyEx event can have this values: ielSelected, ielDeselected, ielMoved, ielResized, ielRotated, ielCreated, ielAction, ielEdited, ielRemoved, ielArranged... Deletion = ielRemoved and creation = ielCreated. This works by my programms perfect.
Klaus www.klausdoege.de |
 |
|
nwscomps
  
190 Posts |
Posted - Sep 15 2018 : 12:22:00
|
Klaus did you try my code? How are you adding removing layers
Francesco Savastano Nwscomps.com Add-ons for the ImageEn Library |
 |
|
nwscomps
  
190 Posts |
Posted - Sep 15 2018 : 12:29:31
|
Just checked in the imageen code and found the reason why is not notified:
procedure TImageEnView.LayersRemove(LyrIndex: Integer = LYR_SELECTED_LAYERS); begin LayersRemoveEx( LyrIndex, loAutoUndoChangesbyCode in fLayerOptions ); end;
procedure TImageEnView.LayersRemoveEx(LyrIndex: Integer = LYR_SELECTED_LAYERS; SaveUndo: Boolean = False; CallLayerNotify: Boolean = False);
........ if CallLayerNotify then DoLayerNotify( LyrIndex, ielBeforeRemove );
but CallLayerNotify is false by default
Francesco Savastano Nwscomps.com Add-ons for the ImageEn Library |
 |
|
klausdoege
  
Germany
389 Posts |
Posted - Sep 16 2018 : 02:41:57
|
Sorry you're right, it only works if I edit the layer with the mouse. If I delete it with a procedure the layer, nothing happens. So it only responds to mouse events? This is a pity.
Klaus www.klausdoege.de |
 |
|
xequte
    
39141 Posts |
|
|
Topic  |
|