mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-21 13:05:38 +05:00
Adjust to HEAD modifications
This commit is contained in:
parent
546c2e40d8
commit
4b80ae180d
@ -81,8 +81,9 @@
|
|||||||
|
|
||||||
#include "SalomeApp_Tools.h"
|
#include "SalomeApp_Tools.h"
|
||||||
#include "SalomeApp_Study.h"
|
#include "SalomeApp_Study.h"
|
||||||
#include "LightApp_DataOwner.h"
|
|
||||||
#include "SalomeApp_Application.h"
|
#include "SalomeApp_Application.h"
|
||||||
|
#include "SalomeApp_CheckFileDlg.h"
|
||||||
|
#include "LightApp_DataOwner.h"
|
||||||
#include "LightApp_Preferences.h"
|
#include "LightApp_Preferences.h"
|
||||||
#include "LightApp_VTKSelector.h"
|
#include "LightApp_VTKSelector.h"
|
||||||
#include "LightApp_Operation.h"
|
#include "LightApp_Operation.h"
|
||||||
@ -287,7 +288,12 @@ namespace{
|
|||||||
|
|
||||||
QString aFilename;
|
QString aFilename;
|
||||||
SMESH::MED_VERSION aFormat;
|
SMESH::MED_VERSION aFormat;
|
||||||
|
// Init the parameter with the default value
|
||||||
|
bool toCreateGroups = false;
|
||||||
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
if ( resMgr )
|
||||||
|
toCreateGroups = resMgr->booleanValue( "SMESH", "auto_groups", false );
|
||||||
|
|
||||||
if ( theCommandID != 122 && theCommandID != 125 )
|
if ( theCommandID != 122 && theCommandID != 125 )
|
||||||
aFilename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(), "", aFilter, aTitle, false);
|
aFilename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(), "", aFilter, aTitle, false);
|
||||||
else
|
else
|
||||||
@ -296,10 +302,12 @@ namespace{
|
|||||||
for ( QMap<QString, SMESH::MED_VERSION>::const_iterator it = aFilterMap.begin(); it != aFilterMap.end(); ++it )
|
for ( QMap<QString, SMESH::MED_VERSION>::const_iterator it = aFilterMap.begin(); it != aFilterMap.end(); ++it )
|
||||||
filters.push_back( it.key() );
|
filters.push_back( it.key() );
|
||||||
|
|
||||||
SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true );
|
//SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true );
|
||||||
|
SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg( SMESHGUI::desktop(), false, QObject::tr("SMESH_AUTO_GROUPS") ,true, true );
|
||||||
fd->setCaption( aTitle );
|
fd->setCaption( aTitle );
|
||||||
fd->setFilters( filters );
|
fd->setFilters( filters );
|
||||||
fd->setSelectedFilter( QObject::tr("MED 2.2 (*.med)") );
|
fd->setSelectedFilter( QObject::tr("MED 2.2 (*.med)") );
|
||||||
|
fd->SetChecked(toCreateGroups);
|
||||||
bool is_ok = false;
|
bool is_ok = false;
|
||||||
while(!is_ok){
|
while(!is_ok){
|
||||||
fd->exec();
|
fd->exec();
|
||||||
@ -320,6 +328,7 @@ namespace{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
toCreateGroups = fd->IsChecked();
|
||||||
delete fd;
|
delete fd;
|
||||||
}
|
}
|
||||||
if ( !aFilename.isEmpty() ) {
|
if ( !aFilename.isEmpty() ) {
|
||||||
@ -331,7 +340,7 @@ namespace{
|
|||||||
switch ( theCommandID ) {
|
switch ( theCommandID ) {
|
||||||
case 125:
|
case 125:
|
||||||
case 122:
|
case 122:
|
||||||
aMesh->ExportToMED( aFilename.latin1(), false, aFormat ); // currently, automatic groups are never created
|
aMesh->ExportToMED( aFilename.latin1(), toCreateGroups, aFormat );
|
||||||
break;
|
break;
|
||||||
case 124:
|
case 124:
|
||||||
case 121:
|
case 121:
|
||||||
@ -1171,39 +1180,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
if( theCommandID==302 )
|
if( theCommandID==302 )
|
||||||
startOperation( myEraseAll );
|
startOperation( myEraseAll );
|
||||||
|
|
||||||
SALOME_ListIteratorOfListIO anIt( sel_objects );
|
extractContainers( sel_objects, to_process );
|
||||||
for( ; anIt.More(); anIt.Next() )
|
|
||||||
{
|
|
||||||
Handle( SALOME_InteractiveObject ) obj = anIt.Value();
|
|
||||||
if( obj->hasEntry() )
|
|
||||||
{
|
|
||||||
_PTR(SObject) SO = activeStudy()->studyDS()->FindObjectID( obj->getEntry() );
|
|
||||||
if( SO && QString( SO->GetID().c_str() ) == SO->GetFatherComponent()->GetID().c_str() )
|
|
||||||
{ //component is selected
|
|
||||||
_PTR(SComponent) SC( SO->GetFatherComponent() );
|
|
||||||
_PTR(ChildIterator) anIter ( activeStudy()->studyDS()->NewChildIterator( SC ) );
|
|
||||||
anIter->InitEx( true );
|
|
||||||
while( anIter->More() )
|
|
||||||
{
|
|
||||||
_PTR(SObject) valSO ( anIter->Value() );
|
|
||||||
_PTR(SObject) refSO;
|
|
||||||
if( !valSO->ReferencedObject( refSO ) )
|
|
||||||
{
|
|
||||||
QString id = valSO->GetID().c_str(),
|
|
||||||
comp = SC->ComponentDataType().c_str(),
|
|
||||||
val = valSO->GetName().c_str();
|
|
||||||
|
|
||||||
Handle( SALOME_InteractiveObject ) new_obj =
|
|
||||||
new SALOME_InteractiveObject( id.latin1(), comp.latin1(), val.latin1() );
|
|
||||||
to_process.Append( new_obj );
|
|
||||||
}
|
|
||||||
anIter->Next();
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
to_process.Append( obj );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vtkwnd) {
|
if (vtkwnd) {
|
||||||
SALOME_ListIteratorOfListIO It( to_process );
|
SALOME_ListIteratorOfListIO It( to_process );
|
||||||
@ -1752,9 +1729,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
char* sName = Hyp->GetName();
|
char* sName = Hyp->GetName();
|
||||||
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(sName);
|
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(sName);
|
||||||
if (aCreator)
|
if (aCreator)
|
||||||
{
|
aCreator->edit( Hyp.in(), desktop() );
|
||||||
aCreator->EditHypothesis(Hyp);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// report error
|
// report error
|
||||||
@ -2890,6 +2865,9 @@ void SMESHGUI::createPreferences()
|
|||||||
setPreferenceProperty( dispmode, "strings", modes );
|
setPreferenceProperty( dispmode, "strings", modes );
|
||||||
setPreferenceProperty( dispmode, "indexes", indices );
|
setPreferenceProperty( dispmode, "indexes", indices );
|
||||||
|
|
||||||
|
int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab );
|
||||||
|
addPreference( tr( "PREF_AUTO_GROUPS" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "auto_groups" );
|
||||||
|
|
||||||
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
||||||
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
|
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
|
||||||
|
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/
|
||||||
|
//
|
||||||
|
|
||||||
#include "SMESHGUI_Selection.h"
|
#include "SMESHGUI_Selection.h"
|
||||||
#include "SMESHGUI_Utils.h"
|
#include "SMESHGUI_Utils.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user