viewManagers( QStringList& theList ) const
{
theList.clear();
- // 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() );
- }
+ // append SVTK viewer only if there is no opened VVTK
+ if( getApp()->getViewManager( VVTK_Viewer::Type(), false ) )
+ theList.append( VVTK_Viewer::Type() );
+ else
+ theList.append( SVTK_Viewer::Type() );
}