1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 03:49:56 +00:00

Tweaked Undo/Redo behavior.

This commit is contained in:
FellippeHeitor 2018-06-11 00:47:47 -03:00
parent bc1ff1b248
commit dc870e19bf
2 changed files with 9 additions and 8 deletions

View file

@ -595,11 +595,9 @@ SUB __UI_Click (id AS LONG)
Control(FileList).Value = 0
Control(FileList).LastVisibleItem = 0 'Reset it so it's recalculated
CASE EditMenuUndo
b$ = MKI$(0)
SendData b$, 214
SendSignal 214
CASE EditMenuRedo
b$ = MKI$(0)
SendData b$, 215
SendSignal 215
CASE EditMenuCopy
b$ = MKI$(0)
SendData b$, 217

View file

@ -343,22 +343,22 @@ SUB __UI_BeforeUpdateDisplay
IF __UI_IsDragging THEN
IF NOT WasDragging THEN
SaveUndoImage
WasDragging = True
END IF
ELSE
IF WasDragging THEN
SaveUndoImage
WasDragging = False
END IF
END IF
IF __UI_IsResizing THEN
IF NOT WasResizing THEN
SaveUndoImage
WasResizing = True
END IF
ELSE
IF WasResizing THEN
SaveUndoImage
WasResizing = False
END IF
END IF
@ -451,6 +451,10 @@ SUB __UI_BeforeUpdateDisplay
END IF
ELSEIF TempValue = -7 THEN
__UI_RestoreImageOriginalSize
ELSEIF TempValue = 214 THEN
RestoreUndoImage
ELSEIF TempValue = 215 THEN
RestoreRedoImage
END IF
LOOP
@ -970,8 +974,7 @@ SUB __UI_BeforeUpdateDisplay
NEXT
IF CVL(b$) > 0 THEN Control(CVL(b$)).ControlIsSelected = True
CASE 214 TO 221
b$ = ReadSequential$(Property$, 2)
CASE 216 TO 221
__UI_KeyPress TempValue
CASE 222 'New textbox control with the NumericOnly property set to true
b$ = ReadSequential$(Property$, 2)