Mercurial > dwindows
comparison win/dw.c @ 502:56ea525c1a24
Only activate the container select callback when the item state changes,
not other item changes. (Fixes an infinite loop in Mark's testcase).
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 17 Jan 2004 16:19:02 +0000 |
parents | 33a266db534b |
children | f3ed8dda02f8 |
comparison
equal
deleted
inserted
replaced
501:8267a3066476 | 502:56ea525c1a24 |
---|---|
1613 if(tmp->message == TVN_SELCHANGED || | 1613 if(tmp->message == TVN_SELCHANGED || |
1614 tmp->message == NM_RCLICK || | 1614 tmp->message == NM_RCLICK || |
1615 tmp->message == TVN_ITEMEXPANDED) | 1615 tmp->message == TVN_ITEMEXPANDED) |
1616 { | 1616 { |
1617 NMTREEVIEW FAR *tem=(NMTREEVIEW FAR *)mp2; | 1617 NMTREEVIEW FAR *tem=(NMTREEVIEW FAR *)mp2; |
1618 NMLISTVIEW FAR *lem=(NMLISTVIEW FAR *)mp2; | |
1618 char tmpbuf[100]; | 1619 char tmpbuf[100]; |
1619 | 1620 |
1620 GetClassName(tem->hdr.hwndFrom, tmpbuf, 99); | 1621 GetClassName(tem->hdr.hwndFrom, tmpbuf, 99); |
1621 | 1622 |
1622 if(strnicmp(tmpbuf, WC_TREEVIEW, strlen(WC_TREEVIEW))==0) | 1623 if(strnicmp(tmpbuf, WC_TREEVIEW, strlen(WC_TREEVIEW))==0) |
1687 } | 1688 } |
1688 } | 1689 } |
1689 } | 1690 } |
1690 else if(strnicmp(tmpbuf, WC_LISTVIEW, strlen(WC_LISTVIEW)+1)==0) | 1691 else if(strnicmp(tmpbuf, WC_LISTVIEW, strlen(WC_LISTVIEW)+1)==0) |
1691 { | 1692 { |
1692 if(tem->hdr.code == LVN_ITEMCHANGED && tmp->message == TVN_SELCHANGED) | 1693 if((lem->hdr.code == LVN_ITEMCHANGED && (lem->uChanged & LVIF_STATE)) && tmp->message == TVN_SELCHANGED) |
1693 { | 1694 { |
1694 if(tmp->window == tem->hdr.hwndFrom) | 1695 if(tmp->window == tem->hdr.hwndFrom) |
1695 { | 1696 { |
1696 LV_ITEM lvi; | 1697 LV_ITEM lvi; |
1697 int iItem; | 1698 int iItem; |