]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.cxx
DFCH
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / buttonGroupFactory.cxx
index 395f12d3b763246c42dff8369d400832283b2d76..57cbf9b544572f124519244a19b6a7d996d47d50 100644 (file)
@@ -2,7 +2,7 @@
  * @file buttonGroupFactory.cxx
  * @brief Implements the ButtonGroupFactory class.
  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * @date  2011-05-24
+ * @date  2011-06-02
  */
 
 #include "buttonGroupFactory.h"
@@ -24,9 +24,9 @@ namespace creaButtonContainer
                ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent,
                    ButtonGroupModel* settings )
                {
+                       ButtonGroupContainer groupView;
                        try
                        {
-                               ButtonGroupContainer groupView;
                                ButtonGroupMap map = settings->GetButtonGroupContainer( );
                                for( ButtonGroupMap::iterator it = map.begin( ); it != map.end( ); ++it )
                                {
@@ -37,8 +37,7 @@ namespace creaButtonContainer
                                        ButtonGroup* group = new ButtonGroup( wxGroupName,
                                            this->GetButtons( parent, ( *it ).second ) );
                                        groupView.push_back( group );
-                               }
-                               return ( groupView );
+                               }//rof
                        }//yrt
                        catch ( const std::exception& e )
                        {
@@ -46,6 +45,7 @@ namespace creaButtonContainer
                                    << "ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent,   ButtonGroupModel* settings )"
                                    << " exception: " << e.what( ) << std::endl;
                        }//chtac
+                       return ( groupView );
                }
                // ----------------------------------------------------------------------------------
                ButtonGroupFactory::ButtonContainer
@@ -60,8 +60,8 @@ namespace creaButtonContainer
                                {
                                        long id = wxNewId( );
                                        buttonList[ id ] = new Button( parent, id, *it );
-                               }
-                               return ( buttonList );
+                               }//rof
+                               //return ( buttonList ); // JPR
                        }//yrt
                        catch ( const std::exception& e )
                        {
@@ -69,6 +69,7 @@ namespace creaButtonContainer
                                    << "ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel )"
                                    << "exception: " << e.what( ) << std::endl;
                        }//chtac
+                       return ( buttonList );   // JPR
                }
        // ----------------------------------------------------------------------------------
        }//ecapseman