Commit 8541d2e2 authored by Claes Sjofors's avatar Claes Sjofors

wb vrepmem bugfix, no name check on move object

parent 027963ba
...@@ -848,7 +848,7 @@ wb_orep *wb_vrepmem::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination ...@@ -848,7 +848,7 @@ wb_orep *wb_vrepmem::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
*sts = LDH__BADDEST; *sts = LDH__BADDEST;
return 0; return 0;
} }
// Check that name is unic // Check that name is unique
if ( name && !nameCheck( dest, name.segment(), code)) { if ( name && !nameCheck( dest, name.segment(), code)) {
*sts = LDH__NAMALREXI; *sts = LDH__NAMALREXI;
return 0; return 0;
...@@ -1183,6 +1183,12 @@ bool wb_vrepmem::moveObject(pwr_tStatus *sts, wb_orep *orep, wb_destination &d) ...@@ -1183,6 +1183,12 @@ bool wb_vrepmem::moveObject(pwr_tStatus *sts, wb_orep *orep, wb_destination &d)
mem_object *memo = ((wb_orepmem *)orep)->memobject(); mem_object *memo = ((wb_orepmem *)orep)->memobject();
// Check that name is unique
if ( !nameCheck( dest, memo->name(), code)) {
*sts = LDH__NAMALREXI;
return false;
}
if ( m_classeditor && !classeditorCheckMove( memo, code, dest, sts)) if ( m_classeditor && !classeditorCheckMove( memo, code, dest, sts))
return false; return false;
...@@ -1878,7 +1884,7 @@ bool wb_vrepmem::exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest d ...@@ -1878,7 +1884,7 @@ bool wb_vrepmem::exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest d
} }
// //
// Check that the name of an object is unic within a sibling group // Check that the name of an object is unique within a sibling group
// //
bool wb_vrepmem::nameCheck( mem_object *memo) bool wb_vrepmem::nameCheck( mem_object *memo)
{ {
...@@ -2952,4 +2958,4 @@ void wb_vrepmem::printPaletteFile() ...@@ -2952,4 +2958,4 @@ void wb_vrepmem::printPaletteFile()
} }
PalFile::config_tree_print( pal_cLocalPaletteFile, menu, &psts); PalFile::config_tree_print( pal_cLocalPaletteFile, menu, &psts);
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment