if(myPointPicker->GetActor() != this) {
myTextActor->SetVisibility(aTextVisibility);
mySphereActor->SetVisibility(aSphereVisibility);
+ //
+ if (GetScalarBarCtrl()->GetIsMarked()) {
+ GetScalarBarCtrl()->SetIsMarked(false);
+ GetScalarBarCtrl()->Update();
+ }
return bRet;
}
//
if(theSelector->IsSelected(myIO))
theSelector->AddOrRemoveIndex(myIO,anObjId,theSelectionEvent->myIsShift);
else{
- if(!theSelectionEvent->myIsShift)
+ if(!theSelectionEvent->myIsShift){
theSelector->ClearIObjects();
+ }
theSelector->AddOrRemoveIndex(myIO,anObjId,theSelectionEvent->myIsShift);
theSelector->AddIObject(this);
}
vtkDataSet* aDataSet = GetInput();
vtkCellData* aCellData = aDataSet->GetCellData();
if(vtkDataArray* aScalarArray = aCellData->GetScalars()){
+ float aVal = aScalarArray->GetTuple1(aVtkId);
float aRadius = myGaussPointsPL->GetPointSize(aVtkId, aScalarArray);
mySphereSourceSelected->SetRadius(aRadius);
+ //
if(theSelector->HasIndex(myIO)){
mySphereActorSelected->SetVisibility(1);
- }else{
+ GetScalarBarCtrl()->SetIsMarked(true);
+ GetScalarBarCtrl()->SetMarkValue(aVal);
+ }
+ else{
mySphereActorSelected->SetVisibility(0);
mySphereActor->SetVisibility(1);
+ GetScalarBarCtrl()->SetIsMarked(false);
}
+ GetScalarBarCtrl()->Update();
myTextActor->SetVisibility(1);
}
if(aSelectionMode == CellSelection){
// Hilighting an element from the parent Mesh
if(theSelector->HasIndex(myIO)){
- const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = myGaussPointsPL->GetGaussPtsIDMapper();
+ const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper =
+ myGaussPointsPL->GetGaussPtsIDMapper();
VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
myCellSource->Reset();
myCellActor->SetVisibility(1);
}
}
-
return bRet;
//
}// if( anObjId >= 0 ) {
}//if( aVtkId >= 0 && theSelector->IsValid( this, aVtkId, true ) && hasIO())
+ if (GetScalarBarCtrl()->GetIsMarked()) {
+ GetScalarBarCtrl()->SetIsMarked(false);
+ GetScalarBarCtrl()->Update();
+ }
}// if( !isRectangle )
//
else {
// shoe sphere
myTextActor->SetVisibility(1);
mySphereActor->SetVisibility(1);
+ //
return bRet;
}// if (bIsAdded){
}// if( anObjId >= 0 )
return myMaximumNumberOfColors;
}
//==================================================================
-// function : MarkValue
+// function : SetMarkValue
// purpose :
//==================================================================
-void VISU_ScalarBarCtrl::MarkValue(const float theValue)
+void VISU_ScalarBarCtrl::SetMarkValue(const float theValue)
{
- myMarked=true;
myMarkedValue=theValue;
}
//==================================================================
-// function : UnmarkValue
+// function : GetMarkValue
// purpose :
//==================================================================
-void VISU_ScalarBarCtrl::UnmarkValue()
+float VISU_ScalarBarCtrl::GetMarkValue()const
{
- myMarked=false;
+ return myMarkedValue;
+}
+//==================================================================
+// function : SetIsMarked
+// purpose :
+//==================================================================
+void VISU_ScalarBarCtrl::SetIsMarked(const bool theFlag)
+{
+ myMarked=theFlag;
+}
+//==================================================================
+// function : GetIsMarked
+// purpose :
+//==================================================================
+bool VISU_ScalarBarCtrl::GetIsMarked()const
+{
+ return myMarked;
}
//==================================================================
// function : Update