Commit 22a469a4 authored by Claes Sjofors's avatar Claes Sjofors

wbload files was always loaded as classeditor files

parent 1fdc3954
......@@ -86,19 +86,24 @@ void wb_vrepmem::loadWbl( const char *filename, pwr_tStatus *sts, bool reload)
return;
}
// Insert vrepwbl in local merep to interprete the Template objects
if ( m_merep == m_erep->merep())
m_merep = new wb_merep( *m_erep->merep(), this);
if ( vrep->cid() == pwr_eClass_ClassVolume) {
// Start the class editor
// Insert vrepwbl in local merep to interprete the Template objects
if ( m_merep == m_erep->merep())
m_merep = new wb_merep( *m_erep->merep(), this);
wb_mvrep *mvrep = m_merep->volume( sts, vrep->vid());
if ( ODD(*sts))
m_merep->removeDbs( sts, mvrep);
wb_mvrep *mvrep = m_merep->volume( sts, vrep->vid());
if ( ODD(*sts))
m_merep->removeDbs( sts, mvrep);
m_merep->addDbs( sts, (wb_mvrep *)vrep);
m_merep->addDbs( sts, (wb_mvrep *)vrep);
// Change merep in ref volumes
m_erep->setRefMerep( m_merep);
// Change merep in ref volumes
m_erep->setRefMerep( m_merep);
m_classeditor = true;
}
vrep->ref();
m_vid = vrep->vid();
strcpy( m_filename, filename);
......@@ -107,7 +112,6 @@ void wb_vrepmem::loadWbl( const char *filename, pwr_tStatus *sts, bool reload)
importVolume( *vrep);
vrep->unref();
m_classeditor = true;
*sts = LDH__SUCCESS;
}
......@@ -1941,12 +1945,13 @@ bool wb_vrepmem::commit(pwr_tStatus *sts)
return false;
}
printPaletteFile();
// Reload to get new template objects
clear();
loadWbl( m_filename, sts, true);
if ( m_classeditor) {
printPaletteFile();
// Reload to get new template objects
clear();
loadWbl( m_filename, sts, true);
}
return true;
}
......
......@@ -237,7 +237,9 @@ class wb_vrepmem : public wb_vrep, public wb_import
public:
wb_vrepmem( wb_erep *erep) :
m_erep(erep), m_merep(erep->merep()), m_nRef(0), root_object(0),
volume_object(0), m_nextOix(0) {}
volume_object(0), m_nextOix(0), m_source_vid(0), m_classeditor(false),
m_ignore(false)
{ strcpy( m_filename, "");}
wb_vrepmem( wb_erep *erep, pwr_tVid vid);
~wb_vrepmem();
......
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