-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_InputPane.cxx
// Author : Oleg UVAROV
//---------------------------------------------------------------
VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
- SalomeApp_Module* theModule,
- VisuGUI_Prs3dDlg* theDialog ) :
+ SalomeApp_Module* theModule,
+ VisuGUI_Prs3dDlg* theDialog ) :
QGroupBox( theDialog ),
myModule( theModule ),
myDialog( theDialog ),
//---------------------------------------------------------------
VisuGUI_InputPane::~VisuGUI_InputPane()
{
- LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(myModule);
+ if ( myModule->getApp() ) {
+ LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(myModule);
+
+ if (myFieldFilter)
+ {
+ aSelectionMgr->removeFilter(myFieldFilter);
+ delete myFieldFilter;
+ }
- if (myFieldFilter)
- {
- aSelectionMgr->removeFilter(myFieldFilter);
- delete myFieldFilter;
+ // Restore initial selection
+ if(isRestoreInitialSelection)
+ aSelectionMgr->setSelectedObjects(mySavedSelection);
}
-
- // Restore initial selection
- if(isRestoreInitialSelection)
- aSelectionMgr->setSelectedObjects(mySavedSelection);
}
void VisuGUI_InputPane::SetRestoreInitialSelection(bool on){
{
QList<QListWidgetItem*> aList = mySelectedGroups->findItems( theItem->text(), Qt::MatchExactly );
if ( aList.isEmpty() )
- mySelectedGroups->insertItem( mySelectedGroups->count(), theItem->text() );
+ mySelectedGroups->insertItem( mySelectedGroups->count(), theItem->text() );
}
else if (aListWidget == mySelectedGroups)
delete theItem;
{
_PTR(SObject) aChildObj = aIter->Value();
if( !aChildObj )
- return;
+ return;
if( anEntityName.isNull() )
{
- _PTR(SObject) aRefObj;
- if( aChildObj->ReferencedObject( aRefObj ) )
- anEntityName = aRefObj->GetName().c_str();
+ _PTR(SObject) aRefObj;
+ if( aChildObj->ReferencedObject( aRefObj ) )
+ anEntityName = aRefObj->GetName().c_str();
}
VISU::Storable::TRestoringMap aRestoringMap = VISU::Storable::GetStorableMap(aChildObj);
if( aRestoringMap["myComment"] == "TIMESTAMP" )
{
- aTimeStampName = aChildObj->GetName().c_str();
- myTimeStamps->addItem( aTimeStampName );
+ aTimeStampName = aChildObj->GetName().c_str();
+ myTimeStamps->addItem( aTimeStampName );
}
}