theWidget->AddObserver(vtkCommand::DisableEvent,
myEventCallbackCommand.GetPointer(),
myPriority);
-
+ theWidget->AddObserver(vtkCommand::EndInteractionEvent,
+ myEventCallbackCommand.GetPointer(),
+ myPriority);
}
myWidget = theWidget;
case VISU::UpdatePickingSettingsEvent:
UpdatePickingSettings();
break;
+ case vtkCommand::EndInteractionEvent:
+ case vtkCommand::EnableEvent:
+ case vtkCommand::DisableEvent:
+ myCurrentPL->GetMapper()->Update();
+ Highlight(isHighlighted());
+ break;
default:
break;
}
return false;
vtkIdType aVtkId = myPointPicker->GetPointId();
+
if(aVtkId >= 0 && mySelector->IsValid(this,aVtkId,true) && hasIO()){
vtkIdType anObjId = GetNodeObjId( aVtkId );
if(myLastObjPointID != anObjId){
}
//==================================================================
-// function : highlight
+// function : Highlight
// purpose :
//==================================================================
void
break;
}
+
switch(theEvent){
case vtkCommand::EnableEvent:
myCurrentPL = myInsideDeviceActor->GetPipeLine();
case vtkCommand::DisableEvent:
myCurrentPL = myDeviceActor->GetPipeLine();
break;
+ default:
+ break;
}
-
+
Superclass::OnInteractorEvent(theEvent);
}
}
if(theWidget){
- theWidget->AddObserver(vtkCommand::EndInteractionEvent,
- myEventCallbackCommand.GetPointer(),
- myPriority);
myDeviceActor->GetPipeLine()->SetImplicitFunction(theWidget->ImplicitFunction());
myDeviceActor->SetVisibility(Superclass::GetVisibility() && theWidget->IsEnabled());
}
}
break;
case vtkCommand::EndInteractionEvent:
- //vtkLODActor::SetMapper(GetMapper());
+ Update();
break;
default:
break;
//----------------------------------------------------------------------------
SALOME_ExtractGeometry
::SALOME_ExtractGeometry():
- myStoreMapping(false)
+ myStoreMapping(false),
+ myIsDoneShallowCopy(false)
{}
SALOME_ExtractGeometry
SALOME_ExtractGeometry
::GetElemVTKId(vtkIdType theID)
{
- if(myElemVTK2ObjIds.empty())
+ if(!myStoreMapping||myIsDoneShallowCopy){
return theID;
-
+ }
vtkIdType iEnd = myElemVTK2ObjIds.size();
for(vtkIdType i = 0; i < iEnd; i++)
if(myElemVTK2ObjIds[i] == theID)
SALOME_ExtractGeometry
::GetNodeVTKId(vtkIdType theID)
{
- if (myElemVTK2ObjIds.empty())
+ if (!myStoreMapping||myIsDoneShallowCopy){
return theID;
-
+ }
vtkIdType iEnd = myNodeVTK2ObjIds.size();
for(vtkIdType i = 0; i < iEnd; i++)
if(myNodeVTK2ObjIds[i] == theID)
SALOME_ExtractGeometry
::GetElemObjId(int theVtkID)
{
- if (myElemVTK2ObjIds.empty())
+ if (!myStoreMapping||myIsDoneShallowCopy){
return theVtkID;
-
-#if defined __GNUC_2__
- return myElemVTK2ObjIds[theVtkID];
-#else
- return myElemVTK2ObjIds.at(theVtkID);
-#endif
+ }
+ //
+ if (theVtkID<myElemVTK2ObjIds.size()){
+ return myElemVTK2ObjIds[theVtkID];
+ }
+ return -1;
}
SALOME_ExtractGeometry
::GetNodeObjId(int theVtkID)
{
- if (myNodeVTK2ObjIds.empty())
+ if (!myStoreMapping||myIsDoneShallowCopy){
return theVtkID;
-
-#if defined __GNUC_2__
- return myNodeVTK2ObjIds[theVtkID];
-#else
- return myNodeVTK2ObjIds.at(theVtkID);
-#endif
+ }
+ //
+ if (theVtkID<myNodeVTK2ObjIds.size()){
+ return myNodeVTK2ObjIds[theVtkID];
+ }
+ return -1;
}
{
myElemVTK2ObjIds.clear();
myNodeVTK2ObjIds.clear();
+ //
+ myIsDoneShallowCopy = !this->ImplicitFunction;
- bool anIsNothingToDo = !this->ImplicitFunction;
-
- if(!anIsNothingToDo && myImplicitBoolean.GetPointer()){
+ if(!myIsDoneShallowCopy && myImplicitBoolean.GetPointer()){
if(vtkImplicitFunctionCollection* aFunction = myImplicitBoolean->GetFunction()){
- anIsNothingToDo = aFunction->GetNumberOfItems() == 0;
+ myIsDoneShallowCopy = aFunction->GetNumberOfItems() == 0;
}
}
- if(anIsNothingToDo){
+ if(myIsDoneShallowCopy){
GetOutput()->ShallowCopy(GetInput());
Modified();
return;