mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-30 16:27:48 +05:00
NPAL 18363
This commit is contained in:
parent
0d45320fe4
commit
b51d7706d2
@ -207,12 +207,14 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
|
||||
|
||||
if( !GEOMBase::GetShape(aSelectedObject, S) )
|
||||
return;
|
||||
|
||||
QString aName = GEOMBase::GetName( aSelectedObject );
|
||||
|
||||
if ( testResult && !aSelectedObject->_is_nil() && aSelectedObject != myBase)
|
||||
{
|
||||
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
QString aName = GEOMBase::GetName( aSelectedObject );
|
||||
|
||||
aSelMgr->GetIndexes( firstIObject(), aMap );
|
||||
if ( aMap.Extent() == 1 )
|
||||
{
|
||||
@ -225,11 +227,16 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
|
||||
aSelMgr->clearSelected();
|
||||
}
|
||||
else {
|
||||
myPath = aSelectedObject;
|
||||
myOkPath = true;
|
||||
myOkPath = true;
|
||||
if (S.ShapeType() != TopAbs_EDGE) {
|
||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
aName = "";
|
||||
myOkPath = false;
|
||||
}
|
||||
myEditCurrentArgument->setText( aName );
|
||||
myPath = aSelectedObject;
|
||||
}
|
||||
}
|
||||
myEditCurrentArgument->setText( aName );
|
||||
}
|
||||
|
||||
displayPreview();
|
||||
@ -243,17 +250,18 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
|
||||
void GenerationGUI_PipeDlg::SetEditCurrentArgument()
|
||||
{
|
||||
QPushButton* send = (QPushButton*)sender();
|
||||
globalSelection();
|
||||
|
||||
if(send == GroupPoints->PushButton1) {
|
||||
GroupPoints->LineEdit1->setFocus();
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
}
|
||||
else if(send == GroupPoints->PushButton2) {
|
||||
GroupPoints->LineEdit2->setFocus();
|
||||
myEditCurrentArgument = GroupPoints->LineEdit2;
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
localSelection( anObj, TopAbs_EDGE );
|
||||
globalSelection();
|
||||
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
|
||||
}
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
@ -289,6 +289,7 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument()
|
||||
if (!testResult)
|
||||
return;
|
||||
|
||||
bool myOk = true;
|
||||
TopoDS_Shape aShape;
|
||||
QString aName = GEOMBase::GetName( aSelectedObject );
|
||||
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() )
|
||||
@ -305,15 +306,22 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument()
|
||||
aName.append( ":edge_" + QString::number( anIndex ) );
|
||||
aSelMgr->clearSelected();
|
||||
}
|
||||
else {
|
||||
if (aShape.ShapeType() != TopAbs_EDGE && myEditCurrentArgument == GroupPoints->LineEdit2) {
|
||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
aName = "";
|
||||
myOk = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
|
||||
myBase = aSelectedObject;
|
||||
myOkBase = true;
|
||||
}
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2 && myOk) {
|
||||
myOkVec = true;
|
||||
myVec = aSelectedObject;
|
||||
myOkVec = true;
|
||||
}
|
||||
myEditCurrentArgument->setText( aName );
|
||||
}
|
||||
@ -343,9 +351,10 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument()
|
||||
|
||||
QString aName = GEOMBase::GetName( aSelectedObject );
|
||||
TopoDS_Shape aShape;
|
||||
|
||||
bool myOk = true;
|
||||
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() )
|
||||
{
|
||||
|
||||
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes( firstIObject(), aMap );
|
||||
@ -358,21 +367,29 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument()
|
||||
aName.append( ":vertex_" + QString::number( anIndex ) );
|
||||
aSelMgr->clearSelected();
|
||||
}
|
||||
else {
|
||||
if ( (aShape.ShapeType() != TopAbs_EDGE && myEditCurrentArgument == GroupPoints2->LineEdit2 ) ||
|
||||
(aShape.ShapeType() != TopAbs_EDGE && myEditCurrentArgument == GroupPoints2->LineEdit3 )) {
|
||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
aName = "";
|
||||
myOk = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
myEditCurrentArgument->setText( aName );
|
||||
|
||||
if (myEditCurrentArgument == GroupPoints2->LineEdit1) {
|
||||
myBase = aSelectedObject;
|
||||
myOkBase = true;
|
||||
}
|
||||
else if (myEditCurrentArgument == GroupPoints2->LineEdit2) {
|
||||
myPoint1 = aSelectedObject;
|
||||
else if (myEditCurrentArgument == GroupPoints2->LineEdit2 && myOk) {
|
||||
myOkPnt1 = true;
|
||||
myPoint1 = aSelectedObject;
|
||||
}
|
||||
else if (myEditCurrentArgument == GroupPoints2->LineEdit3) {
|
||||
myPoint2 = aSelectedObject;
|
||||
else if (myEditCurrentArgument == GroupPoints2->LineEdit3 && myOk) {
|
||||
myOkPnt2 = true;
|
||||
myPoint2 = aSelectedObject;
|
||||
}
|
||||
|
||||
}
|
||||
@ -407,12 +424,11 @@ void GenerationGUI_PrismDlg::LineEditReturnPressed()
|
||||
void GenerationGUI_PrismDlg::SetEditCurrentArgument()
|
||||
{
|
||||
QPushButton* send = (QPushButton*)sender();
|
||||
globalSelection( GEOM_POINT ); // to break previous local selection
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
|
||||
if (send == GroupPoints->PushButton1) {
|
||||
GroupPoints->LineEdit1->setFocus();
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
}
|
||||
else if (send == GroupPoints->PushButton2) {
|
||||
GroupPoints->LineEdit2->setFocus();
|
||||
@ -422,7 +438,6 @@ void GenerationGUI_PrismDlg::SetEditCurrentArgument()
|
||||
else if (send == GroupPoints2->PushButton1) {
|
||||
GroupPoints2->LineEdit1->setFocus();
|
||||
myEditCurrentArgument = GroupPoints2->LineEdit1;
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
}
|
||||
else if (send == GroupPoints2->PushButton2) {
|
||||
GroupPoints2->LineEdit2->setFocus();
|
||||
|
@ -253,12 +253,17 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
|
||||
int anIndex = aMap( 1 );
|
||||
aName.append( ":edge_" + QString::number( anIndex ) );
|
||||
myAxis = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
aSelMgr->clearSelected();
|
||||
myOkAxis = true;
|
||||
}
|
||||
else {
|
||||
myOkAxis = true;
|
||||
if (aShape.ShapeType() != TopAbs_EDGE) {
|
||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
aName = "";
|
||||
myOkAxis = false;
|
||||
}
|
||||
else
|
||||
myAxis = aSelectedObject;
|
||||
|
||||
myOkAxis = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -284,7 +289,6 @@ void GenerationGUI_RevolDlg::SetEditCurrentArgument()
|
||||
else if(send == GroupPoints->PushButton2) {
|
||||
GroupPoints->LineEdit2->setFocus();
|
||||
myEditCurrentArgument = GroupPoints->LineEdit2;
|
||||
//globalSelection( GEOM_LINE );
|
||||
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
|
||||
}
|
||||
SelectionIntoArgument();
|
||||
|
Loading…
x
Reference in New Issue
Block a user