Changeset 288:eb0b5d076d77 in finroc_tools_finstruct-java


Ignore:
Timestamp:
04.04.2020 15:05:02 (2 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Adapts property editor component factory to deep copy original values to new value buffers before assignment of new value. This adds support for generic data types such as math vector variants without a dedicated native class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • propertyeditor/FinrocComponentFactory.java

    r282 r288  
    181181        } 
    182182 
     183        @SuppressWarnings({ "unchecked", "rawtypes" }) 
    183184        @Override 
    184185        public void set(String s) throws Exception { 
     
    186187                DataTypeBase dt = SerializationHelper.getTypedStringDataType(dataType, s); 
    187188                BinarySerializable buffer = (BinarySerializable)dt.createInstance(); 
     189                if (buffer instanceof Copyable) { 
     190                    ((Copyable)buffer).copyFrom(wrapped.get()); 
     191                } 
    188192                SerializationHelper.typedStringDeserialize(buffer, s); 
    189193                wrapped.set(buffer); 
Note: See TracChangeset for help on using the changeset viewer.