'From Squeak4.1beta of 2 April 2010 [latest update: #9876] on 6 April 2010 at 3:53:56 pm'!
"Change Set:		OmniTweaks
Date:			6 April 2010
Author:			Andreas Raab

Performance improvements for OB."!


!OBButtonBar methodsFor: 'updating' stamp: 'ar 4/6/2010 15:47'!
updateButton: aButton for: aCommand 

	^aButton 
		model: aCommand;
		setBalloonText: aCommand longDescription;
		yourself! !

!OBButtonBar methodsFor: 'updating' stamp: 'ar 4/6/2010 15:48'!
updateCommands
	| cmds |
	cmds := model commands.
	cmds size = self submorphs size ifTrue:[
		cmds with: self submorphs 
			do:[:cmd :button| self updateButton: button for: cmd].
	] ifFalse:[
		self removeAllMorphs.
		cmds do: [:ea | self addButtonFor: ea].
	].! !


!OBColumn methodsFor: 'accessing' stamp: 'ar 4/6/2010 15:51'!
switchFilter: aFilter
	"We should only be sending #changed: if the filter is actually different
	from the one the switch already has, but that causes some visually odd
	behavior because of the way OBRadioButtonBar resizes its self when updating,
	so for now we always just recreate the button bar."

	switch filter == aFilter ifTrue:[^self].
	switch filter: aFilter.
	self changed: #switch! !

