diff dynamin/gui/check_box.d @ 68:6580fabb7dce

Setting a property to the value it already is shouldn't do anything
author Jordan Miner <jminer7@gmail.com>
date Mon, 10 Aug 2009 02:48:15 -0500
parents d5823ccfddc6
children 651082a9b364
line wrap: on
line diff
--- a/dynamin/gui/check_box.d	Mon Aug 10 02:46:42 2009 -0500
+++ b/dynamin/gui/check_box.d	Mon Aug 10 02:48:15 2009 -0500
@@ -76,7 +76,10 @@
 	}
 	/// ditto
 	void checked(bool b) {
+		auto old = _checkState;
 		_checkState = b ? CheckState.Checked : CheckState.Unchecked;
+		if(_checkState == old)
+			return;
 		repaint();
 		checkedChanged(new EventArgs);
 	}