-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <SVTK_ViewModel.h>
#include <SVTK_ViewWindow.h>
#include <SALOME_ListIO.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
// SALOME KERNEL includes
#include <SALOMEDSClient.hxx>
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
+
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
QApplication::instance()->processEvents();
+ myEditCurrentArgument->hide();
+ myEditCurrentArgument->show();
updateGeometry();
resize(100,100);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
+ SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
myMeshes[0]->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
aMeshEditor->Scale( src, aPoint, aScaleFact, false);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
+ SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
groups = aMeshEditor->ScaleMakeGroups( src, aPoint, aScaleFact);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
+ SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
aMeshEditor->Scale( src, aPoint, aScaleFact, true);
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
- SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
+ SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
mesh = aMeshEditor->ScaleMakeMesh( src, aPoint, aScaleFact, makeGroups,
LineEditNewMesh->text().toLatin1().data());
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_ScaleDlg::enterEvent (QEvent*)
{
- if (!ConstructorsBox->isEnabled())
+ if (!ConstructorsBox->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=======================================================================
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
- SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
+ SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
aMeshEditor->Scale( src, aPoint, aScaleFact, copy);
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
}