1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 10:30:36 +00:00

Fix an error invoking the contextual menu.

If the ide window was too small (e.g. default size 80x25) and a subwindow was being shown (help window) drawing the contextual menu caused an error.
This commit is contained in:
FellippeHeitor 2016-02-07 18:01:43 -02:00
parent 71a7a3e2a9
commit 4901270af3

View file

@ -3353,10 +3353,14 @@ DO
NEXT
yy = 2
IF idecontextualmenu = 1 THEN
actual.idewy = idewy
if idesubwindow <> 0 then
actual.idewy = idewy + idesubwindow
end if
xx = idectxmenuX
if xx < 3 then xx = 3
yy = idectxmenuY
if yy + menusize(m) + 2 > idewy then yy = idewy - 2 - menusize(m)
if yy + menusize(m) + 2 > actual.idewy then yy = actual.idewy - 2 - menusize(m)
END IF
IF xx > idewx - w - 3 THEN xx = idewx - w - 3