Xcos MVC: Fixed default datatype
[scilab.git] / scilab / modules / scicos / src / cpp / view_scilab / ports_management.hxx
index 610f8d5..0f0c006 100644 (file)
@@ -66,6 +66,11 @@ types::InternalType* get_ports_property(const Adaptor& adaptor, object_propertie
             return o;
         }
         case DATATYPE_TYPE:
+            // The type defaults to [1] if no port has been defined
+            if (ids.empty())
+            {
+                return new types::Double(1);
+            }
             datatypeIndex++;
             // no break
         case DATATYPE_COLS: