* Bug #11501 fixed - Use $$..$$ for LaTeX in SciNotes comments to avoid
confusion with Scilab code.
+* Bug #11549 fixed - Prefs window changed its dimension when hitting Default.
+
* Bug #11711 fixed - xclick and xgetmouse did not work under Mac OS X.
* Bug #11778 fixed - Bad color_map dims did not return an error.
// TODO top layout changes
visitor = new XUpdateVisitor(correspondance);
visitor.visit(topSwing, topDOM);
- setDimension(dialog, topDOM);
- dialog.pack();
+ boolean changed = setDimension(dialog, topDOM);
+ if (changed) {
+ dialog.pack();
+ }
return true;
}
* @param component : the resized component.
* @param peer : the node having the dimension information.
*/
- public static void setDimension(final Component component, final Node peer) {
+ public static boolean setDimension(final Component component, final Node peer) {
int height = XConfigManager.getInt(peer, "height", 0);
int width = XConfigManager.getInt(peer, "width", 0);
if (height > 0 && width > 0) {
- component.setPreferredSize(new Dimension(width, height));
- }
+ Dimension old = component.getPreferredSize();
+ if (old.width != width || old.height != height) {
+ component.setPreferredSize(new Dimension(width, height));
+ return true;
+ }
+ }
+
+ return false;
}
/**