}
*/
}
- SUPERVGraph_ViewFrame* aViewFrame = dynamic_cast<SUPERVGraph_ViewFrame*>( createGraph() );
+
+ SUPERVGraph_ViewFrame* aViewFrame;
+ if ( !myInitialViewFrame ) {
+ // first case : create a ViewFrame object
+ aViewFrame = dynamic_cast<SUPERVGraph_ViewFrame*>( createGraph() );
+ }
+ else {
+ // second case : get empty initial view frame as new ViewFrame object
+ aViewFrame = myInitialViewFrame;
+ myInitialViewFrame = 0;
+ }
+
if( aViewFrame ) {
main = new SUPERVGUI_Main( aViewFrame, application()->desktop(), aDataFlow );
registerGraph( aIORName, main );