mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-23 17:10:34 +05:00
Recherche de l'étude sous-jacente
This commit is contained in:
parent
bb46a82d43
commit
4434b7437b
@ -1970,12 +1970,12 @@ void SMESHGUI::OnEditDelete()
|
|||||||
int objectCount = 0;
|
int objectCount = 0;
|
||||||
QString aNameList;
|
QString aNameList;
|
||||||
QString aParentComponent = QString::null;
|
QString aParentComponent = QString::null;
|
||||||
|
|
||||||
for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() )
|
for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() )
|
||||||
{
|
{
|
||||||
Handle(SALOME_InteractiveObject) anIO = anIt.Value();
|
Handle(SALOME_InteractiveObject) anIO = anIt.Value();
|
||||||
if ( anIO.IsNull() ) continue;
|
if ( anIO.IsNull() ) continue;
|
||||||
|
|
||||||
QString father = "unknown", name;
|
QString father = "unknown", name;
|
||||||
|
|
||||||
_PTR(SObject) aSO = aStudy->FindObjectID( anIO->getEntry() );
|
_PTR(SObject) aSO = aStudy->FindObjectID( anIO->getEntry() );
|
||||||
@ -3048,7 +3048,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
{
|
{
|
||||||
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_nil();
|
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_nil();
|
||||||
SMESHGUI_AdaptDlg *aDlg = new SMESHGUI_AdaptDlg( this, theCommandID, aMesh);
|
SMESHGUI_AdaptDlg *aDlg = new SMESHGUI_AdaptDlg( this, theCommandID, aMesh);
|
||||||
aDlg->show();
|
// aDlg->show();
|
||||||
}
|
}
|
||||||
// Adaptation - end
|
// Adaptation - end
|
||||||
|
|
||||||
@ -5368,7 +5368,7 @@ void SMESHGUI::createPreferences()
|
|||||||
setPreferenceProperty( dispgroup, "columns", 2 );
|
setPreferenceProperty( dispgroup, "columns", 2 );
|
||||||
|
|
||||||
addPreference( tr( "PREF_FITALL_ON_DISPLAYONLY" ), dispgroup, LightApp_Preferences::Bool, "SMESH", "fitall_on_displayonly" );
|
addPreference( tr( "PREF_FITALL_ON_DISPLAYONLY" ), dispgroup, LightApp_Preferences::Bool, "SMESH", "fitall_on_displayonly" );
|
||||||
|
|
||||||
int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" );
|
int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" );
|
||||||
QStringList modes;
|
QStringList modes;
|
||||||
modes.append( tr("MEN_WIRE") );
|
modes.append( tr("MEN_WIRE") );
|
||||||
|
@ -134,16 +134,20 @@ SMESHGUI_AdaptDlg::SMESHGUI_AdaptDlg( SMESHGUI* theModule,
|
|||||||
myIsApplyAndClose( false )
|
myIsApplyAndClose( false )
|
||||||
{
|
{
|
||||||
std::cout << "SMESHGUI_AdaptDlg avec theCommandID : " << theCommandID << std::endl;
|
std::cout << "SMESHGUI_AdaptDlg avec theCommandID : " << theCommandID << std::endl;
|
||||||
initDialog( true );
|
if ( ! OnGUIEvent (theCommandID) )
|
||||||
if ( !theMesh->_is_nil() )
|
|
||||||
init( theMesh );
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
mySelectSubMesh->setEnabled( false );
|
INFOS("Erreur");
|
||||||
mySelectGroup->setEnabled( false );
|
|
||||||
myGeomGroupBtn->setEnabled( false );
|
|
||||||
myGeomGroupLine->setEnabled( false );
|
|
||||||
}
|
}
|
||||||
|
// initDialog( true );
|
||||||
|
// if ( !theMesh->_is_nil() )
|
||||||
|
// init( theMesh );
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// mySelectSubMesh->setEnabled( false );
|
||||||
|
// mySelectGroup->setEnabled( false );
|
||||||
|
// myGeomGroupBtn->setEnabled( false );
|
||||||
|
// myGeomGroupLine->setEnabled( false );
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// OnGUIEvent for the adaptations
|
// OnGUIEvent for the adaptations
|
||||||
@ -152,24 +156,25 @@ bool SMESHGUI_AdaptDlg::OnGUIEvent (int theCommandID)
|
|||||||
{
|
{
|
||||||
std::cout << "OnGUIEvent avec theCommandID : " << theCommandID << std::endl;
|
std::cout << "OnGUIEvent avec theCommandID : " << theCommandID << std::endl;
|
||||||
// A. Controles
|
// A. Controles
|
||||||
// SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( application() );
|
SalomeApp_Application* app =
|
||||||
// if ( !app ) return false;
|
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
//
|
if ( !app ) return false;
|
||||||
// SalomeApp_Study* stud = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
|
||||||
// if ( !stud )
|
SalomeApp_Study* stud = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
||||||
// {
|
if ( !stud )
|
||||||
// MESSAGE ( "FAILED to cast active study to SalomeApp_Study" );
|
{
|
||||||
// return false;
|
MESSAGE ( "FAILED to cast active study to SalomeApp_Study" );
|
||||||
// }
|
return false;
|
||||||
//
|
}
|
||||||
// SUIT_Desktop* parent = application()->desktop();
|
|
||||||
//
|
SUIT_Desktop* parent = SUIT_Session::session()->activeApplication()->desktop();
|
||||||
|
|
||||||
// ADAPT::ADAPT_Gen_var homardGen = ADAPTGUI::InitHOMARDGen(app);
|
// ADAPT::ADAPT_Gen_var homardGen = ADAPTGUI::InitHOMARDGen(app);
|
||||||
//
|
//
|
||||||
// if (!CORBA::is_nil(homardGen))
|
// if (!CORBA::is_nil(homardGen))
|
||||||
// homardGen->UpdateStudy();
|
// homardGen->UpdateStudy();
|
||||||
//
|
//
|
||||||
// getApp()->updateObjectBrowser();
|
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||||
//
|
//
|
||||||
// B. Choix selon les commandes
|
// B. Choix selon les commandes
|
||||||
SCRUTE(theCommandID);
|
SCRUTE(theCommandID);
|
||||||
@ -177,7 +182,7 @@ bool SMESHGUI_AdaptDlg::OnGUIEvent (int theCommandID)
|
|||||||
{
|
{
|
||||||
case 8011: // Creation d un Cas
|
case 8011: // Creation d un Cas
|
||||||
{
|
{
|
||||||
MESSAGE("command " << theCommandID << " activated");
|
INFOS("Creation d'un Cas");
|
||||||
// MonCreateCase *aDlg = new MonCreateCase( true,
|
// MonCreateCase *aDlg = new MonCreateCase( true,
|
||||||
// ADAPT::ADAPT_Gen::_duplicate(homardGen) ) ;
|
// ADAPT::ADAPT_Gen::_duplicate(homardGen) ) ;
|
||||||
// aDlg->show();
|
// aDlg->show();
|
||||||
|
Loading…
Reference in New Issue
Block a user