From 68a301426894b85fd468a7d8750521b960801e55 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Sun, 13 May 2018 22:51:07 -0300 Subject: [PATCH] Changes paste routine behavior. - When you paste controls without a selection, the pasted controls will be placed where they were originally located. If a control is selected, the newly pasted controls will be slightly offset when pasted. --- InForm/UiEditorPreview.bas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/InForm/UiEditorPreview.bas b/InForm/UiEditorPreview.bas index d936b1b..88dd84a 100644 --- a/InForm/UiEditorPreview.bas +++ b/InForm/UiEditorPreview.bas @@ -1533,7 +1533,9 @@ SUB LoadPreview (Destination AS _BYTE) REDIM __UI_TempTips(1 TO CVL(b$)) AS STRING REDIM _PRESERVE Control(0 TO CVL(b$)) AS __UI_ControlTYPE ELSE + DIM ShiftPosition AS _BYTE FOR i = 1 TO UBOUND(Control) + IF Control(i).ControlIsSelected THEN ShiftPosition = True Control(i).ControlIsSelected = False NEXT @@ -1581,11 +1583,15 @@ SUB LoadPreview (Destination AS _BYTE) IF LogFileLoad THEN PRINT #LogFileNum, "HEIGHT:" + STR$(CVI(b$)) IF NOT Disk THEN b$ = ReadSequential$(Clip$, 2) ELSE b$ = SPACE$(2): GET #BinaryFileNum, , b$ NewLeft = CVI(b$) - IF NOT Disk THEN NewLeft = NewLeft + 20 IF LogFileLoad THEN PRINT #LogFileNum, "LEFT:" + STR$(CVI(b$)) IF NOT Disk THEN b$ = ReadSequential$(Clip$, 2) ELSE b$ = SPACE$(2): GET #BinaryFileNum, , b$ NewTop = CVI(b$) - IF NOT Disk THEN NewTop = NewTop + 20 + IF NOT Disk THEN + IF ShiftPosition THEN + NewLeft = NewLeft + 20 + NewTop = NewTop + 20 + END IF + END IF IF LogFileLoad THEN PRINT #LogFileNum, "TOP:" + STR$(CVI(b$)) IF NOT Disk THEN b$ = ReadSequential$(Clip$, 2) ELSE b$ = SPACE$(2): GET #BinaryFileNum, , b$ IF CVI(b$) > 0 THEN