[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnetlib ChangeLog System.Windows.Forms/ListBox.cs
From: |
Heiko Weiss |
Subject: |
[dotgnu-pnet-commits] pnetlib ChangeLog System.Windows.Forms/ListBox.cs |
Date: |
Fri, 26 Jan 2007 14:32:23 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: pnetlib
Changes by: Heiko Weiss <brubbel> 07/01/26 14:32:23
Modified files:
. : ChangeLog
System.Windows.Forms: ListBox.cs
Log message:
cleanup selection list, if items changed.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnetlib/ChangeLog?cvsroot=dotgnu-pnet&r1=1.2468&r2=1.2469
http://cvs.savannah.gnu.org/viewcvs/pnetlib/System.Windows.Forms/ListBox.cs?cvsroot=dotgnu-pnet&r1=1.16&r2=1.17
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/ChangeLog,v
retrieving revision 1.2468
retrieving revision 1.2469
diff -u -b -r1.2468 -r1.2469
--- ChangeLog 26 Jan 2007 13:24:29 -0000 1.2468
+++ ChangeLog 26 Jan 2007 14:32:23 -0000 1.2469
@@ -1,3 +1,7 @@
+2007-01-26 Heiko Weiss <address@hidden>
+
+ * System.Windows.Forms/ListBox.cs: cleanup selection list, if items
changed.
+
2007-01-26 Radek Polak <address@hidden>
* configure.in, tests/Makefile.am: Add forms test directory.
Index: System.Windows.Forms/ListBox.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/System.Windows.Forms/ListBox.cs,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- System.Windows.Forms/ListBox.cs 26 Jan 2007 13:24:29 -0000 1.16
+++ System.Windows.Forms/ListBox.cs 26 Jan 2007 14:32:23 -0000 1.17
@@ -1496,8 +1496,24 @@
// Set up the vertical scrollbar
IList data = (IList) base.dataSource;
- if(data.Count == 0)
+
+ int iDataCount = data.Count;
+ // cleanup all removed items in selction list
+
+ this.suppressEvents = true;
+
+ for( int i = 0; i < this.selectedIndices.Count; i++ ) {
+ if( this.selectedIndices[i] >= iDataCount ) {
+ this.selectedIndices.RemoveAt(i);
+ }
+ }
+
+ this.suppressEvents = false;
+
+ if(iDataCount == 0) {
this.vertScrollbar.Visible = false;
+ // this.ClearSelected();
+ }
else
{
this.vertScrollbar.Maximum = data.Count;
- [dotgnu-pnet-commits] pnetlib ChangeLog System.Windows.Forms/ListBox.cs,
Heiko Weiss <=