Changeset 345:b362d65ed980 in finroc_tools_gui-java


Ignore:
Timestamp:
05.12.2018 11:50:52 (6 days ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
default
Phase:
public
Tags:
tip
Message:

Makes connection panel rendering more robust with respect to loading different GUI files (replacing GUI model)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ConnectionPanel.java

    r334 r345  
    10651065        if (node instanceof PortWrapper) { 
    10661066            AbstractPort port = ((PortWrapper)node).getPort(); 
     1067            if (port == null) { 
     1068                return result; 
     1069            } 
    10671070            result.textColor = tree.getBackground(); 
    10681071            boolean rpc = port.getDataType().getTypeClassification() == DataTypeBase.CLASSIFICATION_RPC_TYPE; 
     
    10831086                                  (rpc ? ConnectorIcon.RPC : 0); 
    10841087            } 
    1085         } else if (node instanceof Widget && ((Widget)node).getParent().getSelection().contains(node)) { 
     1088        } else if ((node instanceof Widget) && ((Widget)node).getParent() != null && ((Widget)node).getParent().getSelection().contains(node)) { 
    10861089            result.nodeColor = Color.YELLOW; 
    10871090        } 
Note: See TracChangeset for help on using the changeset viewer.