Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 359807
Collapse All | Expand All

(-)src/org/eclipse/swt/widgets/Control.java (-1 / +7 lines)
Lines 2317-2323 Link Here
2317
    if( updateMode ) {
2317
    if( updateMode ) {
2318
      updateMode();
2318
      updateMode();
2319
    }
2319
    }
2320
    packed = false;
2320
    clearPacked( oldSize );
2321
    notifyMove( oldLocation );
2321
    notifyMove( oldLocation );
2322
    notifyResize( oldSize );
2322
    notifyResize( oldSize );
2323
  }
2323
  }
Lines 2325-2330 Link Here
2325
  void updateMode() {
2325
  void updateMode() {
2326
    // subclasses may override
2326
    // subclasses may override
2327
  }
2327
  }
2328
  
2329
  private void clearPacked( Point oldSize ) {
2330
    if( !oldSize.equals( getSize() ) ) {
2331
      packed = false;
2332
    }
2333
  }
2328
2334
2329
  void notifyResize( final Point oldSize ) {
2335
  void notifyResize( final Point oldSize ) {
2330
    if( !oldSize.equals( getSize() ) ) {
2336
    if( !oldSize.equals( getSize() ) ) {
(-)src/org/eclipse/swt/widgets/Control_Test.java (+9 lines)
Lines 996-999 Link Here
996
      // Expected Exception
996
      // Expected Exception
997
    }
997
    }
998
  }
998
  }
999
  
1000
  public void testNotClearPackedOnSetLocation() {
1001
    shell.pack();
1002
1003
    shell.setLocation( 1, 2 );
1004
1005
    IControlAdapter controlAdapter = ( IControlAdapter )shell.getAdapter( IControlAdapter.class );
1006
    assertTrue( controlAdapter.isPacked() );
1007
  }
999
}
1008
}

Return to bug 359807