X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FBaseMPRWidget.cxx;h=2017b177f7e75617a79e8f96a4d0d132977dd923;hb=8e5fd31fd4d280781d8bc27a799361bf9c30b1d4;hp=fece6b83b15688d26bfb8fdc83bedcd94ba85d3c;hpb=4a793c6b8f400b2303a3f69680aea22948d8ecc6;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/BaseMPRWidget.cxx b/lib/cpPlugins/Interface/BaseMPRWidget.cxx index fece6b8..2017b17 100644 --- a/lib/cpPlugins/Interface/BaseMPRWidget.cxx +++ b/lib/cpPlugins/Interface/BaseMPRWidget.cxx @@ -84,6 +84,18 @@ ShowImage( const double& r, const double& g, const double& b ) { + // Update tree view + QTreeWidgetItem* new_item = this->_UpdateItem( name, parent ); + if( new_item == NULL ) + return( false ); + + // Associate new data + this->m_Images[ name ] = image; + this->m_Tree[ name ] = parent; + + // Show image and return + this->m_MPRObjects->AddImage( image ); + return( true ); } // ------------------------------------------------------------------------- @@ -118,6 +130,7 @@ ShowMesh( const double& r, const double& g, const double& b ) { + return false; } // -------------------------------------------------------------------------