fixed bug, which prevented bug.n from Main_reload, if the number of monitors changed

This commit is contained in:
joten 2012-10-14 17:59:42 +02:00
parent 7882684e74
commit 7ba6efb080
2 changed files with 13 additions and 2 deletions

View file

@ -3,3 +3,4 @@ syntax: glob
src/log.txt
syntax: regexp
.*[cC]onfig.*\.ini
.+\.\w{3}~

View file

@ -123,7 +123,7 @@ Return
Main_reload()
{
Local i
Local i, m
Manager_resetWindowBorder()
@ -133,6 +133,16 @@ Main_reload()
Config_init()
Manager_setWindowBorder()
Bar_getHeight()
SysGet, m, MonitorCount
If Not (m = Manager_monitorCount)
{
MsgBox, 48, bug.n: Reload, The number of monitors changed. You should restart bug.n (by default with the hotkey Win+Ctrl+Shift+R).
If (m < Manager_monitorCount)
{
Manager_monitorCount := m
Manager_aMonitor := 1
}
}
Loop, % Manager_monitorCount
{
Monitor_getWorkArea(A_Index)