// function : EraseSimulationShape()
// purpose : Clears the display of 'mySimulationShape' a pure graphical shape
//==================================================================================
-void EntityGUI::EraseSimulationShape()
+void EntityGUI::EraseSimulationShape(int Sh)
{
int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount();
for(int i = 0; i < count; i++) {
if(QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
- ic->Erase(mySimulationShape1, Standard_True, Standard_False);
- ic->ClearPrs(mySimulationShape1);
- ic->Erase(mySimulationShape2, Standard_True, Standard_False);
- ic->ClearPrs(mySimulationShape2);
+ if(Sh < 1) {
+ ic->Erase(mySimulationShape1, Standard_True, Standard_False);
+ ic->ClearPrs(mySimulationShape1);
+ }
+ if(Sh <= 1) {
+ ic->Erase(mySimulationShape2, Standard_True, Standard_False);
+ ic->ClearPrs(mySimulationShape2);
+ }
ic->UpdateCurrentViewer();
}
}
void OnSketchEnd(const char *Cmd);
void DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
- void EraseSimulationShape();
+ void EraseSimulationShape(int Sh = 0);
/* Methods for sub shapes explode */
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
//=================================================================================
void EntityGUI_SketcherDlg::SelectionIntoArgument()
{
- myEntityGUI->EraseSimulationShape();
+ myEntityGUI->EraseSimulationShape(1); //Juste Shape2!!
Group1Sel->buttonApply->setEnabled(false);
Group1Sel->buttonApply->setFocus();
myY = 0.0;
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
- if(nbSel != 1) {
+ if(nbSel != 1)
return;
- }
/* nbSel == 1 */
TopoDS_Shape S;
gp_Pnt myPoint1;
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
- if(!myGeomBase->GetTopoFromSelection(mySelection, S)) {
- // this->MakeSimulationAndDisplay();
+ if(!myGeomBase->GetTopoFromSelection(mySelection, S))
return;
- }
if(myEditCurrentArgument == Group1Sel->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) {
myX = myPoint1.X();
this->MakeSimulationAndDisplay();
}
-
return;
}