+ hasPrecedingStrechables = true;
+ break;
+ }
+ }
+
+ if ( hasPrecedingStrechables )
+ {
+ // if the removed tool is preceded by stretch spacers
+ // just redistribute the space
+ UpdateStretchableSpacersSize();
+ }
+ else
+ {
+ // reposition all the controls after this button but before any
+ // stretch spacer (the toolbar takes care of all normal items)
+ for ( /* node -> first after deleted */ ; node; node = node->GetNext() )
+ {
+ wxToolBarTool *tool2 = (wxToolBarTool*)node->GetData();
+
+ if ( tool2->IsControl() )
+ {
+ tool2->MoveBy(-delta);
+ }
+
+ // if a stretch spacer is found just redistribute the available space
+ else if ( tool2->IsStretchable() )
+ {
+ UpdateStretchableSpacersSize();
+ break;
+ }