Commit e3a836da authored by Claes Sjofors's avatar Claes Sjofors

Wb classeditor move was too restrictive

parent 38c69274
...@@ -1328,9 +1328,26 @@ bool wb_vrepmem::moveObject(pwr_tStatus* sts, wb_orep* orep, wb_destination& d) ...@@ -1328,9 +1328,26 @@ 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 // Check that name is unique
if (!nameCheck(dest, memo->name(), code)) { switch ( code) {
*sts = LDH__NAMALREXI; case ldh_eDest_After:
return false; case ldh_eDest_Before:
if (memo->fth != dest->fth) {
if (!nameCheck(dest, memo->name(), code)) {
*sts = LDH__NAMALREXI;
return false;
}
}
break;
case ldh_eDest_IntoLast:
case ldh_eDest_IntoFirst:
if (memo->fth != dest) {
if (!nameCheck(dest, memo->name(), code)) {
*sts = LDH__NAMALREXI;
return false;
}
}
break;
default: ;
} }
if (m_classeditor && !classeditorCheckMove(memo, code, dest, sts)) if (m_classeditor && !classeditorCheckMove(memo, code, dest, sts))
...@@ -2228,6 +2245,7 @@ bool wb_vrepmem::commit(pwr_tStatus* sts) ...@@ -2228,6 +2245,7 @@ bool wb_vrepmem::commit(pwr_tStatus* sts)
wprint.getErrCnt(), (wprint.getErrCnt() == 1) ? "" : "s"); wprint.getErrCnt(), (wprint.getErrCnt() == 1) ? "" : "s");
MsgWindow::message('E', str); MsgWindow::message('E', str);
} }
fp.close();
} catch (wb_error& e) { } catch (wb_error& e) {
*sts = e.sts(); *sts = e.sts();
return false; return false;
......
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