mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-27 22:40:34 +05:00
DCQ: Debug Selection in Sketcher
This commit is contained in:
parent
ebc2144ffc
commit
edcd9dae04
@ -185,17 +185,21 @@ void EntityGUI::DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shap
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public :
|
||||
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);
|
||||
|
@ -694,7 +694,7 @@ void EntityGUI_SketcherDlg::ClickOnUndo()
|
||||
//=================================================================================
|
||||
void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
||||
{
|
||||
myEntityGUI->EraseSimulationShape();
|
||||
myEntityGUI->EraseSimulationShape(1); //Juste Shape2!!
|
||||
|
||||
Group1Sel->buttonApply->setEnabled(false);
|
||||
Group1Sel->buttonApply->setFocus();
|
||||
@ -706,19 +706,16 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
||||
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();
|
||||
@ -730,7 +727,6 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
||||
this->MakeSimulationAndDisplay();
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user