Fix for #26111, #26112 & #26121, "only first button click worked in windows"

* In windows the old button was tested to be equal to the new button (ui_but_equals_old()) even if their optype wasn't the same. Adding a check for optypes fixes all three reported issues.
* For some strange reason this didn't happen on other platforms.
This commit is contained in:
Janne Karhu
2011-02-18 15:06:02 +00:00
parent 0f661b154f
commit a0b88e1c49

View File

@@ -497,6 +497,7 @@ static int ui_but_equals_old(uiBut *but, uiBut *oldbut)
if(oldbut->func_arg1 != oldbut && but->func_arg1 != oldbut->func_arg1) return 0; if(oldbut->func_arg1 != oldbut && but->func_arg1 != oldbut->func_arg1) return 0;
if(oldbut->func_arg2 != oldbut && but->func_arg2 != oldbut->func_arg2) return 0; if(oldbut->func_arg2 != oldbut && but->func_arg2 != oldbut->func_arg2) return 0;
if(!but->funcN && ((but->poin != oldbut->poin && (uiBut*)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return 0; if(!but->funcN && ((but->poin != oldbut->poin && (uiBut*)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return 0;
if(but->optype != oldbut->optype) return 0;
return 1; return 1;
} }