'From Squeak3.1alpha of 5 February 2001 [latest update: #3650] on 19 February 2001 at 8:55:47 am'! "Change Set: addGlobalFlapsFix Date: 19 February 2001 Author: Bob Arning When doing the global flap adjustment when going to a new project, do not create the flaps if they do not already exist."! !PasteUpMorph methodsFor: 'flaps' stamp: 'RAA 2/19/2001 08:54'! addGlobalFlaps "Must make global flaps adapt to world. Do this even if not shown, so the old world will not be pointed at by the flaps." | use thisWorld existingFlaps | (existingFlaps _ Utilities globalFlapTabsIfAny) isEmpty ifTrue: [^self]. use _ true. (Preferences valueOfFlag: #useGlobalFlaps) ifFalse: [use _ false]. CurrentProjectRefactoring currentFlapsSuppressed ifTrue: [use _ false]. "Smalltalk isMorphic ifFalse: [use _ false]." thisWorld _ use ifTrue: [self] ifFalse: [(PasteUpMorph new) initForProject: "fake to be flap owner" WorldState new; bounds: (0@0 extent: 4000@4000); viewBox: (0@0 extent: 4000@4000)]. existingFlaps do: [:aFlapTab | (CurrentProjectRefactoring isFlapEnabled: aFlapTab) ifTrue: [(aFlapTab world == thisWorld) ifFalse: [thisWorld addMorphFront: aFlapTab. aFlapTab adaptToWorld: thisWorld]. "always do" use ifTrue: [ aFlapTab spanWorld. aFlapTab adjustPositionAfterHidingFlap. aFlapTab flapShowing ifTrue: [aFlapTab showFlap]]]]. " Utilities clobberFlapTabList. Utilities initializeStandardFlaps. self currentWorld deleteAllFlapArtifacts. self currentWorld addGlobalFlaps. "! !