// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESHGUI.cxx
// Author : Nicolas REJNERI
using namespace std;
-namespace{
+//namespace{
// Declarations
//=============================================================
void ImportMeshesFromFile(SMESH::SMESH_Gen_ptr theComponentMesh,
if ( aFile.exists() )
aFile.remove();
SUIT_OverrideCursor wc;
- switch ( theCommandID ) {
- case 125:
- case 122:
- aMesh->ExportToMED( aFilename.latin1(), toCreateGroups, aFormat );
- break;
- case 124:
- case 121:
- aMesh->ExportDAT( aFilename.latin1() );
- break;
- case 126:
- case 123:
- aMesh->ExportUNV( aFilename.latin1() );
- break;
- default:
- break;
+
+ try {
+ switch ( theCommandID ) {
+ case 125:
+ case 122:
+ aMesh->ExportToMED( aFilename.latin1(), toCreateGroups, aFormat );
+ break;
+ case 124:
+ case 121:
+ aMesh->ExportDAT( aFilename.latin1() );
+ break;
+ case 126:
+ case 123:
+ aMesh->ExportUNV( aFilename.latin1() );
+ break;
+ default:
+ break;
+ }
+ }
+ catch (const SALOME::SALOME_Exception& S_ex){
+ wc.suspend();
+ SUIT_MessageBox::warn1(SMESHGUI::desktop(),
+ QObject::tr("SMESH_WRN_WARNING"),
+ QObject::tr("SMESH_EXPORT_FAILED"),
+ QObject::tr("SMESH_BUT_OK"));
+ wc.resume();
}
}
}
SMESHGUI::GetSMESHGUI()->updateObjBrowser();
}
-}
+//}
extern "C" {
Standard_EXPORT CAM_Module* createModule()
}
}
}
+
+ // PAL13338 -->
+ if ( ( theCommandID==301 || theCommandID==302 ) && !checkLock(aStudy) && !automaticUpdate() )
+ SMESH::UpdateView();
+ // PAL13338 <--
if (anAction == SMESH::eErase) {
SALOME_ListIO l1;
}
else
aSel->setSelectedObjects( to_process );
+
break;
}
if ( vtkwnd ) {
int nbSel = selected.Extent();
if (nbSel != 1){
+ SUIT_MessageBox::warn1(desktop(),
+ tr("SMESH_WRN_WARNING"),
+ tr("SMESH_WRN_NO_AVAILABLE_DATA"),
+ tr("SMESH_BUT_OK"));
break;
}
}
SMESH::RepaintCurrentView();
}
- }else{
+ }
+ else{
SUIT_MessageBox::warn1(desktop(),
tr("SMESH_WRN_WARNING"),
tr("SMESH_WRN_VIEWER_VTK"),
}
updateObjBrowser();
- }catch(const SALOME::SALOME_Exception & S_ex){
+ }
+ catch(const SALOME::SALOME_Exception & S_ex){
SalomeApp_Tools::QtCatchCorbaException(S_ex);
}
}
}
}
}
+ else if(nbSel==0) {
+ SUIT_MessageBox::warn1(desktop(),
+ tr("SMESH_WRN_WARNING"),
+ tr("SMESH_WRN_NO_AVAILABLE_DATA"),
+ tr("SMESH_BUT_OK"));
+ }
break;
}
LightApp_SelectionMgr* mgr = selectionMgr();
SALOME_ListIO selected; mgr->selectedObjects( selected );
- if (selected.Extent() == 1) {
- Handle(SALOME_InteractiveObject) anIObject = selected.First();
- if(anIObject->hasEntry())
+ SALOME_ListIteratorOfListIO it(selected);
+ for(; it.More(); it.Next()) {
+ Handle(SALOME_InteractiveObject) anIObject = it.Value();
+ if(anIObject->hasEntry()) {
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIObject->getEntry())){
anActor->SetPointsLabeled( !anActor->GetPointsLabeled() );
}
+ }
}
break;
}
createSMESHAction( 4051, "RENUM_NODES", "ICON_DLG_RENUMBERING_NODES" );
createSMESHAction( 4052, "RENUM_ELEMENTS", "ICON_DLG_RENUMBERING_ELEMENTS" );
createSMESHAction( 4061, "TRANS", "ICON_SMESH_TRANSLATION_VECTOR" );
- createSMESHAction( 4062, "ROT", "ICON_DLG_ROTATION" );
+ createSMESHAction( 4062, "ROT", "ICON_DLG_MESH_ROTATION" );
createSMESHAction( 4063, "SYM", "ICON_SMESH_SYMMETRY_PLANE" );
createSMESHAction( 4064, "SEW", "ICON_SMESH_SEWING_FREEBORDERS" );
createSMESHAction( 4065, "MERGE", "ICON_SMESH_MERGE_NODES" );
setMenuShown( true );
setToolShown( true );
+ // Reset actions accelerator keys
+ action(111)->setAccel(QKeySequence(CTRL + Key_B)); // Import DAT
+ action(112)->setAccel(QKeySequence(CTRL + Key_U)); // Import UNV
+ action(113)->setAccel(QKeySequence(CTRL + Key_M)); // Import MED
+
return res;
}
EmitSignalCloseAllDialogs();
+ // Unset actions accelerator keys
+ action(111)->setAccel(QKeySequence()); // Import DAT
+ action(112)->setAccel(QKeySequence()); // Import UNV
+ action(113)->setAccel(QKeySequence()); // Import MED
+
return SalomeApp_Module::deactivateModule( study );
}
int fontGr = addPreference( tr( "SMESH_FONT_SCALARBAR" ), sbarTab );
int tfont = addPreference( tr( "SMESH_TITLE" ), fontGr, LightApp_Preferences::Font, "SMESH", "scalar_bar_title_font" );
- addPreference( tr( "SMESH_TITLE" ), fontGr, LightApp_Preferences::Color, "SMESH", "scalar_bar_title_color" );
+ addPreference( tr( "PREF_TITLE_COLOR" ), fontGr, LightApp_Preferences::Color, "SMESH", "scalar_bar_title_color" );
int lfont = addPreference( tr( "SMESH_LABELS" ), fontGr, LightApp_Preferences::Font, "SMESH", "scalar_bar_label_font" );
- addPreference( tr( "SMESH_LABELS" ), fontGr, LightApp_Preferences::Color, "SMESH", "scalar_bar_label_color" );
+ addPreference( tr( "PREF_LABELS_COLOR" ), fontGr, LightApp_Preferences::Color, "SMESH", "scalar_bar_label_color" );
QStringList fam;
fam.append( tr( "SMESH_FONT_ARIAL" ) );