View | Details | Raw Unified | Return to bug 237822
Collapse All | Expand All

(-)src/org/eclipse/gef/internal/ui/palette/editparts/PinnablePaletteStackFigure.java (-1 / +15 lines)
Lines 234-240 Link Here
234
            - (pinSize.height / 2));
234
            - (pinSize.height / 2));
235
        pinFigure.setBounds(pinBounds);
235
        pinFigure.setBounds(pinBounds);
236
    } else {
236
    } else {
237
        headerFigure.setBounds(parent.getClientArea());
237
    	//Fix 237822: If setBounds is called while the expandablePane is closing,
238
    	//the headerFigure will resize itself and cover other icons. setLocation is needed
239
    	//to prevent the headerFigure from disappearing on expandable pane closing
240
    	if(animating)
241
    		headerFigure.setLocation(stackLocation);
242
    	else
243
    		headerFigure.setBounds(parent.getClientArea());
238
    }
244
    }
239
}
245
}
240
}
246
}
Lines 251-259 Link Here
251
        }
257
        }
252
         if (event.getPropertyName() == ButtonModel.SELECTED_PROPERTY) {
258
         if (event.getPropertyName() == ButtonModel.SELECTED_PROPERTY) {
253
259
260
        	//Fix 237822: store the header's location to prevent it moving during animation, then start the animation 
261
        	 stackLocation = headerFigure.getClientArea().getLocation();
262
        	 animating = true;
254
            Animation.markBegin();
263
            Animation.markBegin();
255
            handleExpandStateChanged();
264
            handleExpandStateChanged();
256
            Animation.run(150);
265
            Animation.run(150);
266
            animating = false;
257
267
258
            // Now collapse other stacks when they are not pinned open or in the
268
            // Now collapse other stacks when they are not pinned open or in the
259
            // case of columns and icons layout mode (where only one stack can
269
            // case of columns and icons layout mode (where only one stack can
Lines 296-301 Link Here
296
306
297
private Rectangle headerBoundsLayoutHint = new Rectangle();
307
private Rectangle headerBoundsLayoutHint = new Rectangle();
298
308
309
private boolean animating; //Fix 237822: a flag used  for marking when animation is happening
310
311
private Point stackLocation; //Fix 237822: the location of headerFigure.
312
299
public PinnablePaletteStackFigure() {
313
public PinnablePaletteStackFigure() {
300
    super();
314
    super();
301
315

Return to bug 237822