1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 11:59:34 +00:00

Allows copying more than one frame and their contents.

This commit is contained in:
FellippeHeitor 2018-06-25 00:23:43 -03:00
parent d1b96a6af2
commit 861fce234b

View file

@ -1490,6 +1490,7 @@ SUB DeleteSelectedControls
'Iterate over control list and delete selected controls. 'Iterate over control list and delete selected controls.
FOR i = UBOUND(Control) TO 1 STEP -1 FOR i = UBOUND(Control) TO 1 STEP -1
IF Control(i).Type = __UI_Type_Form THEN _CONTINUE
IF Control(i).ControlIsSelected THEN IF Control(i).ControlIsSelected THEN
IF Control(i).Type = __UI_Type_MenuBar THEN IF Control(i).Type = __UI_Type_MenuBar THEN
DIM MustRefreshMenuBar AS _BYTE DIM MustRefreshMenuBar AS _BYTE
@ -2369,7 +2370,7 @@ SUB SavePreview (Destination AS _BYTE)
DIM b$, i AS LONG, a$, FontSetup$, TempValue AS LONG DIM b$, i AS LONG, a$, FontSetup$, TempValue AS LONG
DIM BinFileNum AS INTEGER, TxtFileNum AS INTEGER DIM BinFileNum AS INTEGER, TxtFileNum AS INTEGER
DIM Clip$, Disk AS _BYTE, TCP AS _BYTE, UndoBuffer AS _BYTE DIM Clip$, Disk AS _BYTE, TCP AS _BYTE, UndoBuffer AS _BYTE
DIM PreviewData$, CopyFrame AS _BYTE DIM PreviewData$
CONST Debug = False CONST Debug = False
@ -2384,9 +2385,12 @@ SUB SavePreview (Destination AS _BYTE)
ELSE ELSE
IF __UI_TotalSelectedControls = 0 THEN EXIT SUB IF __UI_TotalSelectedControls = 0 THEN EXIT SUB
IF __UI_TotalSelectedControls = 1 AND Control(__UI_FirstSelectedID).Type = __UI_Type_Frame THEN DIM SelectedFrames$
CopyFrame = True FOR i = 1 TO UBOUND(Control)
IF Control(i).ControlIsSelected AND Control(i).Type = __UI_Type_Frame THEN
SelectedFrames$ = SelectedFrames$ + ";" + RTRIM$(Control(i).Name) + ";"
END IF END IF
NEXT
END IF END IF
IF Debug THEN IF Debug THEN
@ -2409,13 +2413,11 @@ SUB SavePreview (Destination AS _BYTE)
FOR ThisPass = 1 TO 2 FOR ThisPass = 1 TO 2
FOR i = 1 TO UBOUND(Control) FOR i = 1 TO UBOUND(Control)
IF Destination = InClipboard THEN IF Destination = InClipboard THEN
IF Control(i).Type = __UI_Type_Form THEN _CONTINUE IF Control(i).Type = __UI_Type_Form OR Control(i).Type = __UI_Type_MenuBar THEN _CONTINUE
IF CopyFrame THEN IF Control(i).ControlIsSelected = False THEN
IF ThisPass = 2 THEN IF INSTR(SelectedFrames$, ";" + RTRIM$(Control(Control(i).ParentID).Name) + ";") = 0 THEN
IF Control(i).ParentID <> __UI_FirstSelectedID THEN _CONTINUE _CONTINUE
END IF END IF
ELSE
IF Control(i).ControlIsSelected = False THEN _CONTINUE
END IF END IF
END IF END IF