mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-01 04:10:34 +05:00
0020840: EDF 1371 GEOM : Selection problem with the sketcher
This commit is contained in:
parent
e62cc26cc2
commit
6cb787d382
@ -466,12 +466,13 @@ void EntityGUI_SketcherDlg::PointClicked( int constructorId )
|
|||||||
else if ( constructorId == 2 ) { // Selection
|
else if ( constructorId == 2 ) { // Selection
|
||||||
mySketchType = PT_SEL;
|
mySketchType = PT_SEL;
|
||||||
myEditCurrentArgument = Group1Sel->LineEdit1;
|
myEditCurrentArgument = Group1Sel->LineEdit1;
|
||||||
connect( myGeometryGUI->getApp()->selectionMgr(),
|
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
|
||||||
Group1Sel->show();
|
Group1Sel->show();
|
||||||
Group1Sel->buttonApply->setFocus();
|
Group1Sel->buttonApply->setFocus();
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||||
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -821,6 +822,9 @@ void EntityGUI_SketcherDlg::ClickOnUndo()
|
|||||||
MainWidget->RadioButton1->setChecked( true );
|
MainWidget->RadioButton1->setChecked( true );
|
||||||
TypeClicked( 0 );
|
TypeClicked( 0 );
|
||||||
|
|
||||||
|
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||||
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
MainWidget->GroupConstructors->setEnabled( false );
|
MainWidget->GroupConstructors->setEnabled( false );
|
||||||
MainWidget->GroupDest1->setEnabled( false );
|
MainWidget->GroupDest1->setEnabled( false );
|
||||||
setEnabledUndo( false );
|
setEnabledUndo( false );
|
||||||
@ -888,6 +892,8 @@ void EntityGUI_SketcherDlg::setEnabledRedo( bool value )
|
|||||||
void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
||||||
{
|
{
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
|
double tmpX = myX;
|
||||||
|
double tmpY = myY;
|
||||||
myX = myLastX1;
|
myX = myLastX1;
|
||||||
myY = myLastY1;
|
myY = myLastY1;
|
||||||
|
|
||||||
@ -914,6 +920,27 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
|||||||
myX = aPnt.X();
|
myX = aPnt.X();
|
||||||
myY = aPnt.Y();
|
myY = aPnt.Y();
|
||||||
Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
|
if( Group2Spin->isVisible() && mySketchType == PT_ABS ) {
|
||||||
|
disconnect( Group2Spin->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
disconnect( Group2Spin->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
Group2Spin->SpinBox_DX->setValue(myX);
|
||||||
|
Group2Spin->SpinBox_DY->setValue(myY);
|
||||||
|
connect( Group2Spin->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
connect( Group2Spin->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
} else if ( Group2Spin->isVisible() && mySketchType == PT_RELATIVE ) {
|
||||||
|
if ( myLastX1 && myLastY1 ) {
|
||||||
|
Group2Spin->SpinBox_DX->setValue(myX - myLastX1);
|
||||||
|
Group2Spin->SpinBox_DY->setValue(myY - myLastY1);
|
||||||
|
} else {
|
||||||
|
if ( mySketchState != FIRST_POINT ) {
|
||||||
|
Group2Spin->SpinBox_DX->setValue(myX - tmpX);
|
||||||
|
Group2Spin->SpinBox_DY->setValue(myY - tmpY);
|
||||||
|
} else {
|
||||||
|
Group2Spin->SpinBox_DX->setValue(myX);
|
||||||
|
Group2Spin->SpinBox_DY->setValue(myY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user