Hi,
I'm using ImageEn 8.6.0 now and I have few issues with Layers.
I have few buttons and here is the code from them:
else if SpeedButton29.down then
begin
if not FullScreenwithMenu1.Checked then RightScrollBox.Visible := True;
(ActiveMDIChild as TMDIChild).ImageEnView1.DeSelect;
(ActiveMDIChild as TMDIChild).ImageEnView1.LayersDeselectAll();
IEGlobalSettings().DefaultLayerShape := iesRectangle;
(ActiveMDIChild as TMDIChild).ImageEnView1.MouseInteractLayers := [ mlCreateShapeLayers ];
(ActiveMDIChild as TMDIChild).ImageEnView1.Cursor := 1785;
PopupMenu1.AutoPopup := true;
end
else if SpeedButton25.down then
begin
if not FullScreenwithMenu1.Checked then RightScrollBox.Visible := True;
(ActiveMDIChild as TMDIChild).ImageEnView1.DeSelect;
(ActiveMDIChild as TMDIChild).ImageEnView1.LayersDeselectAll();
(ActiveMDIChild as TMDIChild).ImageEnView1.MouseInteractLayers := [ mlMoveLayers, mlResizeLayers ];
(ActiveMDIChild as TMDIChild).ImageEnView1.Cursor := 1785;
PopupMenu1.AutoPopup := true;
end
And if I do this:
if (ActiveMDIChild as TMDIChild).ImageEnView1.Selected then
begin
(ActiveMDIChild as TMDIChild).ImageEnView1.LayersCreateFromSelection();
(ActiveMDIChild as TMDIChild).ImageEnView1.Deselect;
(ActiveMDIChild as TMDIChild).ImageEnView1.CurrentLayer.Selected:=True;
(ActiveMDIChild as TMDIChild).ImageEnView1.Update;
end;
Then if I select that SpeedButton25 I cannot make Layer Selection correctly, but if I do this in SpeedButton25:
(ActiveMDIChild as TMDIChild).ImageEnView1.MouseInteractLayers := [ mlCreateShapeLayers ];
(ActiveMDIChild as TMDIChild).ImageEnView1.MouseInteractLayers := [ mlMoveLayers, mlResizeLayers ];
Then I can move that created Layer. So is the better way to make Layer selection after creating Layer from selection?