Fix T61505, T61280, bugs in button drag toggle after recent changes.

This commit is contained in:
2019-02-13 18:56:46 +01:00
parent a75ac18638
commit b54b14582b

View File

@@ -1241,9 +1241,10 @@ static bool ui_drag_toggle_but_is_supported(const uiBut *but)
* then just true or false for toggle buttons with more than 2 states. */
static int ui_drag_toggle_but_pushed_state(uiBut *but)
{
if (but->icon) {
if (but->rnapoin.data == NULL && but->poin == NULL && but->icon) {
/* Assume icon identifies a unique state, for buttons that
* work though functions callbacks. */
* work though functions callbacks and don't have an boolean
* value that indicates the state. */
return but->icon + but->iconadd;
}
else if (ui_but_is_bool(but)) {