Correct multiply connection of signals on activate this dialogs.

This commit is contained in:
dmv 2008-11-19 08:35:08 +00:00
parent bb33e4b989
commit 8558f56ffb
22 changed files with 95 additions and 52 deletions

View File

@ -281,8 +281,9 @@ void BooleanGUI_Dialog::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
// reinit, because some selected objects could be removed
Init();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
displayPreview();
}
//=================================================================================

View File

@ -253,8 +253,10 @@ void BuildGUI_EdgeDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
// reinit, because some selected objects could be removed
Init();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
displayPreview();
}
//=================================================================================

View File

@ -574,8 +574,10 @@ void GenerationGUI_PrismDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
// reinit, because some selected objects could be removed
Init();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -343,9 +343,10 @@ void GenerationGUI_RevolDlg::LineEditReturnPressed()
void GenerationGUI_RevolDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
displayPreview();
}
//=================================================================================

View File

@ -313,9 +313,10 @@ void MeasureGUI_NormaleDlg::LineEditReturnPressed()
void MeasureGUI_NormaleDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
displayPreview();
}
//=================================================================================

View File

@ -582,9 +582,10 @@ void OperationGUI_ChamferDlg::LineEditReturnPressed()
void OperationGUI_ChamferDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -494,9 +494,10 @@ void OperationGUI_FilletDlg::LineEditReturnPressed()
void OperationGUI_FilletDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -264,9 +264,9 @@ void OperationGUI_GetShapesOnShapeDlg::LineEditReturnPressed()
void OperationGUI_GetShapesOnShapeDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
// reinit, because some selected objects could be removed
Init();
globalSelection(GEOM_ALLSHAPES);
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
}
//=================================================================================

View File

@ -382,15 +382,12 @@ void PrimitiveGUI_BoxDlg::LineEditReturnPressed()
void PrimitiveGUI_BoxDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
//if (getConstructorId() == 0) {
// localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
// connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
// this, SLOT(SelectionIntoArgument()));
//}
//displayPreview();
// reinit, because some selected objects could be removed
Init();
if (getConstructorId() == 0) {
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
}
displayPreview();
}
//=================================================================================

View File

@ -396,8 +396,10 @@ void PrimitiveGUI_CylinderDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
// reinit, because some selected objects could be removed
Init();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -495,9 +495,10 @@ QLineEdit* send = (QLineEdit*)sender();
void PrimitiveGUI_DiskDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -393,8 +393,10 @@ void PrimitiveGUI_TorusDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
// reinit, because some selected objects could be removed
Init();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -270,9 +270,16 @@ void RepairGUI_CloseContourDlg::LineEditReturnPressed()
void RepairGUI_CloseContourDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
myEditCurrentArgument = GroupPoints->LineEdit1;
myEditCurrentArgument->setText( "" );
GroupPoints->LineEdit2->setText( "" );
myObject = GEOM::GEOM_Object::_nil();
myWiresInd->length( 0 );
initSelection();
}
//=================================================================================

View File

@ -271,9 +271,19 @@ void RepairGUI_RemoveHolesDlg::LineEditReturnPressed()
void RepairGUI_RemoveHolesDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
myEditCurrentArgument = GroupPoints->LineEdit1;
myEditCurrentArgument->setText( "" );
GroupPoints->LineEdit2->setText( "" );
myObject = GEOM::GEOM_Object::_nil();
myWiresInd->length( 0 );
myClosed = -1;
myOpen = -1;
initSelection();
}
//=================================================================================

View File

@ -258,9 +258,17 @@ void RepairGUI_RemoveIntWiresDlg::LineEditReturnPressed()
void RepairGUI_RemoveIntWiresDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
myEditCurrentArgument = GroupPoints->LineEdit1;
myEditCurrentArgument->setText( "" );
GroupPoints->LineEdit2->setText( "" );
myObject = GEOM::GEOM_Object::_nil();
myWiresInd->length( 0 );
//myGeomGUI->SetState( 0 );
initSelection();
}
//=================================================================================

View File

@ -365,9 +365,10 @@ void TransformationGUI_MirrorDlg::LineEditReturnPressed()
void TransformationGUI_MirrorDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -445,9 +445,10 @@ void TransformationGUI_MultiRotationDlg::LineEditReturnPressed()
void TransformationGUI_MultiRotationDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -490,9 +490,10 @@ void TransformationGUI_MultiTranslationDlg::LineEditReturnPressed()
void TransformationGUI_MultiTranslationDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -371,9 +371,10 @@ void TransformationGUI_PositionDlg::LineEditReturnPressed()
void TransformationGUI_PositionDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -449,9 +449,10 @@ void TransformationGUI_RotationDlg::LineEditReturnPressed()
void TransformationGUI_RotationDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -410,9 +410,10 @@ void TransformationGUI_ScaleDlg::LineEditReturnPressed()
void TransformationGUI_ScaleDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================

View File

@ -479,9 +479,10 @@ void TransformationGUI_TranslationDlg::LineEditReturnPressed()
void TransformationGUI_TranslationDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
// reinit, because some selected objects could be removed
Init();
ConstructorsClicked( getConstructorId() );
}
//=================================================================================