1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00

Fixes issue causing problems with multiple instances of the IDE.

For future generations: STATIC array in a SUB/FUNCTION has something broken. So broken it breaks other stuff with it. Requires investigation.
This commit is contained in:
FellippeHeitor 2021-07-30 19:30:06 -03:00
parent ec62d4508b
commit adf4d50f6e

View file

@ -6391,31 +6391,7 @@ SUB DebugMode
AS INTEGER x, y, w, h
AS STRING caption
END TYPE
SELECT EVERYCASE IdeDebugMode
CASE 1
PauseMode = 0
callStackLength = 0
callstacklist$ = ""
buffer$ = ""
client& = 0
IF LEN(variableWatchList$) THEN
totalVisibleVariables = (LEN(variableWatchList$) - 4) \ 4
vWatchPanel.h = totalVisibleVariables + 2
IF vWatchPanel.h > idewy - 10 THEN vWatchPanel.h = idewy - 10
IF vWatchPanel.h < 5 THEN vWatchPanel.h = 5
ELSE
totalVisibleVariables = 0
vWatchPanel.h = 5
END IF
vWatchPanel.w = 40
vWatchPanel.x = idewx - vWatchPanel.w - 6
vWatchPanel.y = 4
vWatchPanel.firstVisible = 1
STATIC Button(1 TO 8) AS ui
DIM Button(1 TO 8) AS ui
i = 0
i = i + 1: Button(i).Caption = "<F4 = Add Watch>"
i = i + 1: Button(i).Caption = "<F5 = Run>"
@ -6440,6 +6416,28 @@ SUB DebugMode
END IF
NEXT
SELECT EVERYCASE IdeDebugMode
CASE 1
PauseMode = 0
callStackLength = 0
callstacklist$ = ""
buffer$ = ""
client& = 0
IF LEN(variableWatchList$) THEN
totalVisibleVariables = (LEN(variableWatchList$) - 4) \ 4
vWatchPanel.h = totalVisibleVariables + 2
IF vWatchPanel.h > idewy - 10 THEN vWatchPanel.h = idewy - 10
IF vWatchPanel.h < 5 THEN vWatchPanel.h = 5
ELSE
totalVisibleVariables = 0
vWatchPanel.h = 5
END IF
vWatchPanel.w = 40
vWatchPanel.x = idewx - vWatchPanel.w - 6
vWatchPanel.y = 4
vWatchPanel.firstVisible = 1
CASE IS > 1
noFocusMessage = NOT noFocusMessage
GOSUB UpdateStatusArea