commit
ff572bf4b5
@ -119,7 +119,8 @@ public class BasicFrame extends JFrame {
|
||||
private static final int SHORTCUT_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
|
||||
|
||||
public static final int COMPONENT_TAB = 0;
|
||||
public static final int SIMULATION_TAB = 1;
|
||||
public static final int CONFIGURATION_TAB = 1;
|
||||
public static final int SIMULATION_TAB = 2;
|
||||
|
||||
|
||||
/**
|
||||
@ -266,7 +267,7 @@ public class BasicFrame extends JFrame {
|
||||
|
||||
// Upper-left segment, component tree
|
||||
|
||||
JPanel panel = new JPanel(new MigLayout("fill, flowy", "", "[grow]"));
|
||||
JPanel panel = new JPanel(new MigLayout("fill, flowy", "[grow][grow 0]","[grow]"));
|
||||
|
||||
tree = new ComponentTree(document);
|
||||
tree.setSelectionModel(componentSelectionModel);
|
||||
|
@ -402,6 +402,24 @@ public class SwingExceptionHandler implements Thread.UncaughtExceptionHandler, E
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Detect and ignore DnD bug in component tree - related to 6560955 in Sun JRE.
|
||||
*/
|
||||
if (t instanceof NullPointerException) {
|
||||
StackTraceElement[] trace = t.getStackTrace();
|
||||
|
||||
if (trace.length > 2 &&
|
||||
trace[0].getClassName().equals("javax.swing.tree.TreePath") &&
|
||||
trace[0].getMethodName().equals("pathByAddingChild") &&
|
||||
|
||||
trace[1].getClassName().equals("javax.swing.plaf.basic.BasicTreeUI") &&
|
||||
trace[1].getMethodName().equals("getDropLineRect")) {
|
||||
|
||||
log.warn("Ignoring Sun JRE bug updating drop location " +
|
||||
"(see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6560955): " + t);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ import javax.swing.SwingUtilities;
|
||||
import javax.swing.Timer;
|
||||
import javax.swing.ToolTipManager;
|
||||
|
||||
import net.miginfocom.layout.LayoutUtil;
|
||||
import net.sf.openrocket.arch.SystemInfo;
|
||||
import net.sf.openrocket.arch.SystemInfo.Platform;
|
||||
import net.sf.openrocket.communication.UpdateInfo;
|
||||
@ -51,6 +52,10 @@ public class SwingStartup {
|
||||
// Check for "openrocket.debug" property before anything else
|
||||
checkDebugStatus();
|
||||
|
||||
if (System.getProperty("openrocket.debug.layout") != null) {
|
||||
LayoutUtil.setGlobalDebugMillis(100);
|
||||
}
|
||||
|
||||
// Initialize logging first so we can use it
|
||||
initializeLogging();
|
||||
log.info("Starting up OpenRocket version " + BuildProperties.getVersion());
|
||||
|
Loading…
x
Reference in New Issue
Block a user