Sfoglia il codice sorgente

Fixes some NullpointerCrashes on Gui, when mouse is not on Canvas

Would occur if keys were pressed, without the mouse hovering over the
Canvas
Andreas T. Meyer-Berg 7 anni fa
parent
commit
26775e9462
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/ui/view/GUI.java

+ 2 - 1
src/ui/view/GUI.java

@@ -2885,7 +2885,8 @@ public class GUI implements CategoryListener {
 	 */
 	private void chooseTabTemp() {
 		// is the uppernode on tabbedPaneOriginal or tabbedPaneSplit
-		if (tabbedPaneOriginal.getMousePosition() != null) {
+		/* TODO: Fix or Remove SplitView */
+		if (tabbedPaneOriginal.getMousePosition() != null || initSplit) {
 			tabTemp = tabbedPaneOriginal;
 		} else {
 			tabTemp = tabbedPaneSplit;