#include "VisuGUI_Timer.h"
+#include "VVTK_ViewModel.h"
+
+
using namespace VISU;
#ifdef _DEBUG_
viewManagers( QStringList& theList ) const
{
theList.clear();
- theList.append( SVTK_Viewer::Type() );
+ // append SVTK viewer only if there is neither SVTK nor VVTK is open
+ QPtrList<SUIT_ViewManager> lst;
+ getApp()->viewManagers( SVTK_Viewer::Type(), lst );
+ if ( !lst.count() ) {
+ lst.clear();
+ getApp()->viewManagers( VVTK_Viewer::Type(), lst );
+ if ( !lst.count() )
+ theList.append( SVTK_Viewer::Type() );
+ }
}
}
}
+ // VISU module opens one SVTK viewer in activateModule(). This causes a bug in save-restore visual
+ // parameters: it no SVTK view was saved, we need NOT any SVTK on restore. Here we store if any is open..
+ /*
+ lst.clear();
+ getApp()->viewManagers( SVTK_Viewer::Type(), lst );
+ ip.setProperty( "VtkViewersCount", QString::number( lst.count() ).latin1() );
+ */
+
// main cycle to store parameters of displayed objects
lst.clear();
getApp()->viewManagers( lst );
}
} // ] end of update views
+ // VISU module opens one SVTK viewer in activateModule(). This causes a bug in save-restore visual
+ // parameters: it no SVTK view was saved, we need NOT any SVTK on restore. Here we close one
+ // default SVTK if needed.
+ /*
+ QString openedSvtkViewerStr = ip.getProperty( "VtkViewersCount" ).c_str();
+ int openedSvtkViewer = openedSvtkViewerStr.toInt( &ok );
+ if ( ok && openedSvtkViewer == 0 ) {
+ lst.clear();
+ getApp()->viewManagers( SVTK_Viewer::Type(), lst );
+ if ( lst.count() )
+ lst.at( 0 )->closeAllViews();
+ }
+ */
+
// if active Gauss Viewer is set ( != -1) then raise the gauss view window.
bool ok;
QString activeGaussViewerStr = ip.getProperty( "ActiveGaussViewer" ).c_str();