Mercurial > dwindows
comparison mac/dw.m @ 1705:3fa0448d3a7e
Fixed a bug in dw_container_delete_row() on Mac and potentially a similar bug in dw_container_delete().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 05 May 2012 20:13:43 +0000 |
parents | 873304f581be |
children | cc10082567ed |
comparison
equal
deleted
inserted
replaced
1704:873304f581be | 1705:3fa0448d3a7e |
---|---|
1846 if(tvcols) | 1846 if(tvcols) |
1847 { | 1847 { |
1848 int z, start, end; | 1848 int z, start, end; |
1849 int count = (int)[tvcols count]; | 1849 int count = (int)[tvcols count]; |
1850 | 1850 |
1851 start = count * row; | 1851 start = (count * row); |
1852 end = start + count; | 1852 end = start + count; |
1853 | 1853 |
1854 for(z=start;z<end;z++) | 1854 for(z=start;z<end;z++) |
1855 { | 1855 { |
1856 [data removeObjectAtIndex:z]; | 1856 [data removeObjectAtIndex:start]; |
1857 } | 1857 } |
1858 [titles removePointerAtIndex:row]; | 1858 [titles removePointerAtIndex:row]; |
1859 if(lastAddPoint > 0 && lastAddPoint < row) | 1859 if(lastAddPoint > 0 && lastAddPoint > row) |
1860 { | 1860 { |
1861 lastAddPoint--; | 1861 lastAddPoint--; |
1862 } | 1862 } |
1863 } | 1863 } |
1864 } | 1864 } |
6581 | 6581 |
6582 for(x=0;x<rowcount;x++) | 6582 for(x=0;x<rowcount;x++) |
6583 { | 6583 { |
6584 [cont removeRow:0]; | 6584 [cont removeRow:0]; |
6585 } | 6585 } |
6586 [cont reloadData]; | |
6586 DW_MUTEX_UNLOCK; | 6587 DW_MUTEX_UNLOCK; |
6587 } | 6588 } |
6588 | 6589 |
6589 /* | 6590 /* |
6590 * Scrolls container up or down. | 6591 * Scrolls container up or down. |
6755 thistext = [cont getRowTitle:x]; | 6756 thistext = [cont getRowTitle:x]; |
6756 | 6757 |
6757 if((textcomp && thistext && strcmp(thistext, text) == 0) || (!textcomp && thistext == text)) | 6758 if((textcomp && thistext && strcmp(thistext, text) == 0) || (!textcomp && thistext == text)) |
6758 { | 6759 { |
6759 [cont removeRow:x]; | 6760 [cont removeRow:x]; |
6761 [cont reloadData]; | |
6760 DW_MUTEX_UNLOCK; | 6762 DW_MUTEX_UNLOCK; |
6761 return; | 6763 return; |
6762 } | 6764 } |
6763 } | 6765 } |
6764 DW_MUTEX_UNLOCK; | 6766 DW_MUTEX_UNLOCK; |