mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-15 11:59:34 +00:00
Fix an issue related to the icon property (forms).
An invalid icon file was allowed but the property couldn't be cleared. That's fixed now.
This commit is contained in:
parent
2d87a35d72
commit
118d720f94
4 changed files with 12 additions and 2 deletions
|
@ -522,6 +522,9 @@ SUB __UI_BeforeUpdateDisplay
|
|||
IF __UI_ActiveMenu > 0 THEN __UI_DestroyControl Control(__UI_ActiveMenu)
|
||||
__UI_Focus = 0
|
||||
__UI_ForceRedraw = True
|
||||
ELSEIF CVI(b$) = -6 THEN
|
||||
'User attempted to load an invalid icon file
|
||||
Answer = MessageBox("Only .ico files are accepted.", "", MsgBox_OkOnly + MsgBox_Exclamation)
|
||||
END IF
|
||||
b$ = MKI$(0): PUT #UiEditorFile, OffsetNewDataFromPreview, b$
|
||||
|
||||
|
|
|
@ -382,8 +382,15 @@ SUB __UI_BeforeUpdateDisplay
|
|||
ELSE
|
||||
_ICON
|
||||
IF _FILEEXISTS(b$) THEN
|
||||
SendSignal -4
|
||||
Text(__UI_FormID) = b$
|
||||
IF LCASE$(RIGHT$(b$, 4)) <> ".ico" THEN
|
||||
SendSignal -6
|
||||
Text(__UI_FormID) = ""
|
||||
ELSE
|
||||
SendSignal -4
|
||||
Text(__UI_FormID) = b$
|
||||
END IF
|
||||
ELSE
|
||||
Text(__UI_FormID) = ""
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
|
BIN
UiEditor.exe
BIN
UiEditor.exe
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue