Mercurial > dwindows
comparison win/dw.c @ 495:477de19f14af
Fixes for dw_container_delete*() so they don't interfere with a pending
dw_container_query*() loop.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 12 Dec 2003 00:07:26 +0000 |
parents | a9a09514dd56 |
children | 33a266db534b |
comparison
equal
deleted
inserted
replaced
494:edcf9ec12f8c | 495:477de19f14af |
---|---|
6763 | 6763 |
6764 for(z=0;z<rowcount;z++) | 6764 for(z=0;z<rowcount;z++) |
6765 { | 6765 { |
6766 ListView_DeleteItem(handle, 0); | 6766 ListView_DeleteItem(handle, 0); |
6767 } | 6767 } |
6768 if(rowcount > _index) | |
6769 _index = 0; | |
6770 else | |
6771 _index -= rowcount; | |
6768 } | 6772 } |
6769 | 6773 |
6770 /* | 6774 /* |
6771 * Scrolls container up or down. | 6775 * Scrolls container up or down. |
6772 * Parameters: | 6776 * Parameters: |
6897 | 6901 |
6898 ListView_GetItem(handle, &lvi); | 6902 ListView_GetItem(handle, &lvi); |
6899 | 6903 |
6900 if((char *)lvi.lParam == text) | 6904 if((char *)lvi.lParam == text) |
6901 { | 6905 { |
6906 if(index < _index) | |
6907 _index--; | |
6908 | |
6902 ListView_DeleteItem(handle, index); | 6909 ListView_DeleteItem(handle, index); |
6903 return; | 6910 return; |
6904 } | 6911 } |
6905 | 6912 |
6906 index = ListView_GetNextItem(handle, index, LVNI_ALL); | 6913 index = ListView_GetNextItem(handle, index, LVNI_ALL); |