Commit d9d1c50e authored by Claes Sjofors's avatar Claes Sjofors

Merge commit 'pwrutv_x470/master'

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