X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESHGUI%2FSMESHGUI.cxx;h=2d0822288fab465a5824c36e6d2831bb01d14832;hb=bd8f1aee7c78f7d2eb82bd4fec5e08c9e3d280ce;hp=47f42b997031a8aca65ef8023b627deedec0e508;hpb=88b3dbe23b236bd1746405155ae33a76aaf59ecd;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 47f42b997..2d0822288 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -1256,7 +1256,7 @@ return; } case 1132: { - vtkFloatingPointType color[3]; + double color[3]; QColor faceColor, edgeColor, nodeColor, elem0dColor, ballColor; QColor orientationColor, outlineColor, volumeColor; int deltaF = 0, deltaV = 0; @@ -1264,8 +1264,8 @@ int ballSize = 1; int edgeWidth = 1; int outlineWidth = 1; - vtkFloatingPointType shrinkCoef = 0.0; - vtkFloatingPointType orientationScale = 0.0; + double shrinkCoef = 0.0; + double orientationScale = 0.0; bool orientation3d = false; VTK::MarkerType markerType = VTK::MT_NONE; VTK::MarkerScale markerScale = VTK::MS_NONE; @@ -1800,6 +1800,15 @@ } } + // Call mesh->Clear() to prevent loading mesh from file caused by hypotheses removal + for( It.Initialize( selected ); It.More(); It.Next()) // loop on selected IO's + { + Handle(SALOME_InteractiveObject) IObject = It.Value(); + SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface< SMESH::SMESH_Mesh >( IObject ); + if ( !mesh->_is_nil() ) + mesh->Clear(); + } + // Treat SO's in the list starting from the back aStudyBuilder->NewCommand(); // There is a transaction for ( ritSO = listSO.rbegin(); ritSO != listSO.rend(); ++ritSO ) @@ -4717,7 +4726,7 @@ void SMESHGUI::createPreferences() int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab ); setPreferenceProperty( exportgroup, "columns", 2 ); addPreference( tr( "PREF_AUTO_GROUPS" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "auto_groups" ); - addPreference( tr( "PREF_RENUMBER" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "renumbering" ); + //addPreference( tr( "PREF_RENUMBER" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "renumbering" ); int computeGroup = addPreference( tr( "PREF_GROUP_COMPUTE" ), genTab ); setPreferenceProperty( computeGroup, "columns", 2 ); @@ -5456,7 +5465,7 @@ void SMESHGUI::storeVisualParameters (int savePoint) ip->setParameter(entry, param, modeStr.toLatin1().data()); // Colors - vtkFloatingPointType r, g, b; + double r, g, b; int delta; aSmeshActor->GetSufaceColor(r, g, b, delta); @@ -5595,8 +5604,8 @@ void SMESHGUI::storeVisualParameters (int savePoint) typedef struct { int Id; vtkIdType Orientation; - vtkFloatingPointType Distance; - vtkFloatingPointType Angle[2]; + double Distance; + double Angle[2]; } TPlaneData; typedef std::list TPlaneDataList; typedef std::map TPlaneDataMap; @@ -6171,7 +6180,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint) if (val != "Off") { SMESH::Orientation anOrientation = (SMESH::Orientation)vals[0].toInt(); double aDistance = vals[1].toFloat(); - vtkFloatingPointType anAngle[2]; + double anAngle[2]; anAngle[0] = vals[2].toFloat(); anAngle[1] = vals[3].toFloat();