Mercurial > projects > dynamin
comparison dynamin/gui/notebook.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 | c138461bf845 |
children | 651082a9b364 |
comparison
equal
deleted
inserted
replaced
67:419e38206522 | 68:6580fabb7dce |
---|---|
149 * there is no selected tab. | 149 * there is no selected tab. |
150 */ | 150 */ |
151 int selectedIndex() { return _selectedIndex; } | 151 int selectedIndex() { return _selectedIndex; } |
152 /// ditto | 152 /// ditto |
153 void selectedIndex(int index) { | 153 void selectedIndex(int index) { |
154 if(_selectedIndex == index) | |
155 return; | |
154 if(index < -1) | 156 if(index < -1) |
155 throw new IllegalArgumentException("index cannot be less than -1"); | 157 throw new IllegalArgumentException("index cannot be less than -1"); |
156 _selectedIndex = index; | 158 _selectedIndex = index; |
157 selectionChanged(new EventArgs); | 159 selectionChanged(new EventArgs); |
158 } | 160 } |