Skip to content

Commit 3b8f4f2

Browse files
authored
Merge pull request #36 from tomaz82/cut-copy-paste
Select pasted illumination frame
2 parents 2fa4825 + 07e343c commit 3b8f4f2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

b2sbackglassdesigner/b2sbackglassdesigner/formDesigner.vb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,6 @@ Public Class formDesigner
712712

713713
' Create a new illumination bulb with all properties copied
714714
Dim newBulb As New Illumination.BulbInfo
715-
newBulb.ID = Backglass.currentBulbs.Max(Function(b) b.ID) + 1 ' Generate a new unique ID
716715
newBulb.B2SID = copiedBulb.B2SID
717716
newBulb.B2SIDType = copiedBulb.B2SIDType
718717
newBulb.B2SValue = copiedBulb.B2SValue
@@ -748,9 +747,19 @@ Public Class formDesigner
748747
newBulb.SnippitInfo.SnippitRotatingStopBehaviour = copiedBulb.SnippitInfo.SnippitRotatingStopBehaviour
749748

750749
' Add the new bulb to the collection
751-
Backglass.currentBulbs.Add(newBulb)
750+
If Backglass.currentTabPage.BackglassData.IsDMDImageShown Then
751+
newBulb.ParentForm = eParentForm.DMD
752+
Backglass.currentTabPage.BackglassData.DMDBulbs.Add(newBulb)
753+
Else
754+
newBulb.ParentForm = eParentForm.Backglass
755+
Backglass.currentTabPage.BackglassData.Bulbs.Add(newBulb)
756+
End If
757+
758+
' Select new bulb
759+
Backglass.currentTabPage.Mouse.SelectedBulb = newBulb
752760

753761
' Refresh screen
762+
Backglass.currentTabPage.BackglassData.IsDirty = True
754763
Backglass.currentTabPage.Invalidate()
755764
Backglass.currentTabPage.RefreshIllumination()
756765
End If

0 commit comments

Comments
 (0)