]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx
#2516 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel with...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaPanelButtonContainer / buttonContainerSettings.cxx
index e93c87a03fcc78994b6dda0b3a478429507dd985..66ba48e856ef1793cc52a7847dd5f49546d48cfa 100644 (file)
@@ -99,13 +99,14 @@ namespace creaPanelButtonContainer
 
 
                try {
-                       if(m_itemsMap.empty())
-                               std::cout<< "no tengo nada "<< std::endl;
 
                        for( ItemsMap::iterator it= this->m_itemsMap.begin(); it!=this->m_itemsMap.end(); ++it )
                        {
                                if( (*it).first.compare(buttonName) == 0 )
+                               {
+                                       std::cout<<"debe retornar" << std::endl;
                                        return ( (*it).second );
+                               }
                        }
 
 
@@ -269,8 +270,9 @@ namespace creaPanelButtonContainer
                        {
                                if( type == 0 )
                                        this->AddButton( *it );
-                               else if( type == 1 )
+                               else if( type == 1 || type == 2)
                                        this->AddItems(*it);
+
                        }//rof
                }//yrt
                catch ( std::exception& e )
@@ -281,9 +283,6 @@ namespace creaPanelButtonContainer
                }//hctac
        }
 
-
-//EED-MLER
-/*
        void
        ButtonContainerSettings::AddItems(BCPSettingsStruct* info)
        {
@@ -294,7 +293,7 @@ namespace creaPanelButtonContainer
                        //I don't know the try catch doesn't work!!
                        if ( info->panel == NULL )
                        {
-                               std::cerr << "ButtonContainerSettings::AddButton"
+                               std::cerr << "ButtonContainerSettings::AddItems"
                                    << "exception: NULL Pointer in panel " << std::endl;
                                exit( 1 );
                        }
@@ -307,24 +306,6 @@ namespace creaPanelButtonContainer
                }//yrt
                catch ( const std::exception& e )
                {
-<<<<<<< HEAD
-                       try
-                       {
-                               for( BCStructVectorType::iterator it = infoList.begin( ); it
-                                   != infoList.end( ); ++it )
-                               {
-                                       this->AddItem(*it);
-                               }//rof
-                       }//yrt
-                       catch ( const std::exception& e )
-                       {
-                               std::cerr
-                           << "ContainerSettings::AddButtons( BCStructVectorType infoList ) "
-                           << "exception: " << e.what( ) << std::endl;
-                       }//hctac
-               }
-*/
-=======
                        std::cerr
                        << "ButtonContainerSettings::AddButton( BCPSettingsStruct* info )"
                        << "exception: " << e.what( ) << std::endl;
@@ -336,11 +317,10 @@ namespace creaPanelButtonContainer
        ButtonContainerSettings::GetItemsMap()
        {
                std::cout<< "MLER | ButtonContainerSettings:: GetItemsMap()" << std::endl;
+
                return m_itemsMap;
        }
 
->>>>>>> b8c5a565c70ac0def1f21518afa2d847a9582d79
 
 // ----------------------------------------------------------------------------------
 }//ecapseman
-