#include "SalomeApp_Tools.h"
#include "SalomeApp_Study.h"
-#include "LightApp_NameDlg.h"
#include "LightApp_DataOwner.h"
#include "SalomeApp_Application.h"
#include "LightApp_Preferences.h"
#include <qstring.h>
#include <qwidget.h>
#include <qaction.h>
+#include <qinputdialog.h>
// BOOST Includes
#include <boost/shared_ptr.hpp>
if(!filename.isEmpty()) {
SUIT_OverrideCursor wc;
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
- theComponentMesh->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
try {
SMESH::mesh_array_var aMeshes = new SMESH::mesh_array;
if( !mgr )
return false;
- if (CORBA::is_nil(GetSMESHGen()->GetCurrentStudy())) {
- GetSMESHGen()->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
- }
-
SUIT_ViewWindow* view = application()->desktop()->activeWindow();
SVTK_ViewWindow* vtkwnd = dynamic_cast<SVTK_ViewWindow*>( view );
SALOME_ListIO l;
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
+ aSel->selectedObjects( l );
aSel->setSelectedObjects( l );
break;
}
{
aName = anAttr;
QString newName = QString(aName->Value().c_str());
- newName = LightApp_NameDlg::getName( desktop(), newName );
- if ( !newName.isEmpty() )
+ bool ok;
+ newName = QInputDialog::getText( tr( "Rename" ), tr( "Enter new name:" ), QLineEdit::Normal,
+ newName, &ok, desktop() );
+ if ( ok && !newName.isEmpty() )
{
//old source: aStudy->renameIObject( IObject, newName );
aName->SetValue( newName.latin1() );
QChar lc = QtxPopupMgr::Selection::defEquality();
QString rule = "(%1) and (%2) and (%3)";
rule = rule.arg( QString( "%1>0" ).arg( QtxPopupMgr::Selection::defSelCountParam() ) );
- rule = rule.arg( QString( "%1client in {%2}" ).arg( lc ).arg( clients ) );
+ if( clients.isEmpty() )
+ rule = rule.arg( QString( "true" ) );
+ else
+ rule = rule.arg( QString( "%1client in {%2}" ).arg( lc ).arg( clients ) );
rule = rule.arg( QString( "%1type in {%2}" ).arg( lc ).arg( types ) );
rule += theRule;
SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
{
+ _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active
if ( CORBA::is_nil( myComponentSMESH ) )
{
SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
+ if ( aStudy )
+ aGUI.myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
return aGUI.myComponentSMESH;
}
+ if ( aStudy )
+ myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
return myComponentSMESH;
}