mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-14 05:47:27 +05:00
IPAL53091: 'Scale of Marker' lists are different in Preferences and Properties dialogs
fix SMESHGUI::createPreferences() + cosmetic changes
This commit is contained in:
parent
7eda9ca931
commit
cc935c7f60
@ -178,11 +178,6 @@
|
|||||||
|
|
||||||
#include <Basics_Utils.hxx>
|
#include <Basics_Utils.hxx>
|
||||||
|
|
||||||
//To disable automatic genericobj management, the following line should be commented.
|
|
||||||
//Otherwise, it should be uncommented.
|
|
||||||
//Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
|
|
||||||
#define WITHGENERICOBJ
|
|
||||||
|
|
||||||
// Below macro, when uncommented, switches on simplified (more performant) algorithm
|
// Below macro, when uncommented, switches on simplified (more performant) algorithm
|
||||||
// of auto-color picking up
|
// of auto-color picking up
|
||||||
#define SIMPLE_AUTOCOLOR
|
#define SIMPLE_AUTOCOLOR
|
||||||
@ -424,17 +419,24 @@ namespace
|
|||||||
if( aSel )
|
if( aSel )
|
||||||
aSel->selectedObjects( selected );
|
aSel->selectedObjects( selected );
|
||||||
|
|
||||||
const bool isDAT = ( theCommandID == SMESHOp::OpExportDAT || theCommandID == SMESHOp::OpPopupExportDAT );
|
const bool isDAT = ( theCommandID == SMESHOp::OpExportDAT ||
|
||||||
const bool isMED = ( theCommandID == SMESHOp::OpExportMED || theCommandID == SMESHOp::OpPopupExportMED );
|
theCommandID == SMESHOp::OpPopupExportDAT );
|
||||||
const bool isUNV = ( theCommandID == SMESHOp::OpExportUNV || theCommandID == SMESHOp::OpPopupExportUNV );
|
const bool isMED = ( theCommandID == SMESHOp::OpExportMED ||
|
||||||
const bool isSTL = ( theCommandID == SMESHOp::OpExportSTL || theCommandID == SMESHOp::OpPopupExportSTL );
|
theCommandID == SMESHOp::OpPopupExportMED );
|
||||||
|
const bool isUNV = ( theCommandID == SMESHOp::OpExportUNV ||
|
||||||
|
theCommandID == SMESHOp::OpPopupExportUNV );
|
||||||
|
const bool isSTL = ( theCommandID == SMESHOp::OpExportSTL ||
|
||||||
|
theCommandID == SMESHOp::OpPopupExportSTL );
|
||||||
#ifdef WITH_CGNS
|
#ifdef WITH_CGNS
|
||||||
const bool isCGNS= ( theCommandID == SMESHOp::OpExportCGNS || theCommandID == SMESHOp::OpPopupExportCGNS );
|
const bool isCGNS= ( theCommandID == SMESHOp::OpExportCGNS ||
|
||||||
|
theCommandID == SMESHOp::OpPopupExportCGNS );
|
||||||
#else
|
#else
|
||||||
const bool isCGNS= false;
|
const bool isCGNS= false;
|
||||||
#endif
|
#endif
|
||||||
const bool isSAUV= ( theCommandID == SMESHOp::OpExportSAUV || theCommandID == SMESHOp::OpPopupExportSAUV );
|
const bool isSAUV= ( theCommandID == SMESHOp::OpExportSAUV ||
|
||||||
const bool isGMF = ( theCommandID == SMESHOp::OpExportGMF || theCommandID == SMESHOp::OpPopupExportGMF );
|
theCommandID == SMESHOp::OpPopupExportSAUV );
|
||||||
|
const bool isGMF = ( theCommandID == SMESHOp::OpExportGMF ||
|
||||||
|
theCommandID == SMESHOp::OpPopupExportGMF );
|
||||||
|
|
||||||
const bool multiMeshSupported = ( isMED || isCGNS ); // file can hold several meshes
|
const bool multiMeshSupported = ( isMED || isCGNS ); // file can hold several meshes
|
||||||
if ( selected.Extent() == 0 || ( selected.Extent() > 1 && !multiMeshSupported ))
|
if ( selected.Extent() == 0 || ( selected.Extent() > 1 && !multiMeshSupported ))
|
||||||
@ -448,7 +450,8 @@ namespace
|
|||||||
for( ; It.More(); It.Next() )
|
for( ; It.More(); It.Next() )
|
||||||
{
|
{
|
||||||
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
||||||
SMESH::SMESH_IDSource_var aMeshItem = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIObject);
|
SMESH::SMESH_IDSource_var aMeshItem =
|
||||||
|
SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIObject);
|
||||||
if ( aMeshItem->_is_nil() ) {
|
if ( aMeshItem->_is_nil() ) {
|
||||||
SUIT_MessageBox::warning( SMESHGUI::desktop(),
|
SUIT_MessageBox::warning( SMESHGUI::desktop(),
|
||||||
QObject::tr( "SMESH_WRN_WARNING" ),
|
QObject::tr( "SMESH_WRN_WARNING" ),
|
||||||
@ -572,7 +575,7 @@ namespace
|
|||||||
if ( !presentNotSupported.empty() )
|
if ( !presentNotSupported.empty() )
|
||||||
{
|
{
|
||||||
QString typeNames;
|
QString typeNames;
|
||||||
const char* typeMsg[SMESH::Entity_Last] = {
|
const char* typeMsg[] = {
|
||||||
"SMESH_NODES", "SMESH_ELEMS0D","SMESH_EDGES","SMESH_QUADRATIC_EDGES",
|
"SMESH_NODES", "SMESH_ELEMS0D","SMESH_EDGES","SMESH_QUADRATIC_EDGES",
|
||||||
"SMESH_TRIANGLES", "SMESH_QUADRATIC_TRIANGLES", "SMESH_BIQUADRATIC_TRIANGLES",
|
"SMESH_TRIANGLES", "SMESH_QUADRATIC_TRIANGLES", "SMESH_BIQUADRATIC_TRIANGLES",
|
||||||
"SMESH_QUADRANGLES","SMESH_QUADRATIC_QUADRANGLES", "SMESH_BIQUADRATIC_QUADRANGLES",
|
"SMESH_QUADRANGLES","SMESH_QUADRATIC_QUADRANGLES", "SMESH_BIQUADRATIC_QUADRANGLES",
|
||||||
@ -582,6 +585,10 @@ namespace
|
|||||||
"SMESH_TRIQUADRATIC_HEXAHEDRONS","SMESH_PENTAHEDRA","SMESH_QUADRATIC_PENTAHEDRONS",
|
"SMESH_TRIQUADRATIC_HEXAHEDRONS","SMESH_PENTAHEDRA","SMESH_QUADRATIC_PENTAHEDRONS",
|
||||||
"SMESH_OCTAHEDRA","SMESH_POLYEDRONS","SMESH_QUADRATIC_POLYEDRONS","SMESH_BALLS"
|
"SMESH_OCTAHEDRA","SMESH_POLYEDRONS","SMESH_QUADRATIC_POLYEDRONS","SMESH_BALLS"
|
||||||
};
|
};
|
||||||
|
// is typeMsg complete? (compilation failure mains that enum SMDSAbs_EntityType changed)
|
||||||
|
int nbTypes = sizeof( typeMsg ) / sizeof( const char* );
|
||||||
|
int _assert[( nbTypes == SMESH::Entity_Last ) ? 1 : -1 ]; _assert[0]=1;
|
||||||
|
|
||||||
QString andStr = " " + QObject::tr("SMESH_AND") + " ", comma(", ");
|
QString andStr = " " + QObject::tr("SMESH_AND") + " ", comma(", ");
|
||||||
for ( size_t iType = 0; iType < presentNotSupported.size(); ++iType ) {
|
for ( size_t iType = 0; iType < presentNotSupported.size(); ++iType ) {
|
||||||
typeNames += QObject::tr( typeMsg[ presentNotSupported[ iType ]]);
|
typeNames += QObject::tr( typeMsg[ presentNotSupported[ iType ]]);
|
||||||
@ -928,7 +935,8 @@ namespace
|
|||||||
theOutputMode &= ~theMode;
|
theOutputMode &= ~theMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDisplayEntity(int theCommandID){
|
void SetDisplayEntity(int theCommandID)
|
||||||
|
{
|
||||||
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
if ( aSel )
|
if ( aSel )
|
||||||
@ -942,24 +950,12 @@ namespace
|
|||||||
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
|
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
|
||||||
unsigned int aMode = anActor->GetEntityMode();
|
unsigned int aMode = anActor->GetEntityMode();
|
||||||
switch(theCommandID){
|
switch(theCommandID){
|
||||||
case SMESHOp::OpDE0DElements:
|
case SMESHOp::OpDE0DElements: InverseEntityMode(aMode,SMESH_Actor::e0DElements); break;
|
||||||
InverseEntityMode(aMode,SMESH_Actor::e0DElements);
|
case SMESHOp::OpDEEdges: InverseEntityMode(aMode,SMESH_Actor::eEdges); break;
|
||||||
break;
|
case SMESHOp::OpDEFaces: InverseEntityMode(aMode,SMESH_Actor::eFaces); break;
|
||||||
case SMESHOp::OpDEEdges:
|
case SMESHOp::OpDEVolumes: InverseEntityMode(aMode,SMESH_Actor::eVolumes); break;
|
||||||
InverseEntityMode(aMode,SMESH_Actor::eEdges);
|
case SMESHOp::OpDEBalls: InverseEntityMode(aMode,SMESH_Actor::eBallElem); break;
|
||||||
break;
|
case SMESHOp::OpDEAllEntity: aMode = SMESH_Actor::eAllEntity; break;
|
||||||
case SMESHOp::OpDEFaces:
|
|
||||||
InverseEntityMode(aMode,SMESH_Actor::eFaces);
|
|
||||||
break;
|
|
||||||
case SMESHOp::OpDEVolumes:
|
|
||||||
InverseEntityMode(aMode,SMESH_Actor::eVolumes);
|
|
||||||
break;
|
|
||||||
case SMESHOp::OpDEBalls:
|
|
||||||
InverseEntityMode(aMode,SMESH_Actor::eBallElem);
|
|
||||||
break;
|
|
||||||
case SMESHOp::OpDEAllEntity:
|
|
||||||
aMode = SMESH_Actor::eAllEntity;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if(aMode)
|
if(aMode)
|
||||||
anActor->SetEntityMode(aMode);
|
anActor->SetEntityMode(aMode);
|
||||||
@ -971,8 +967,8 @@ namespace
|
|||||||
|
|
||||||
void AutoColor()
|
void AutoColor()
|
||||||
{
|
{
|
||||||
SALOME_ListIO selected;
|
SalomeApp_Application* app =
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if ( !app )
|
if ( !app )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -981,6 +977,7 @@ namespace
|
|||||||
if ( !aSel || !appStudy )
|
if ( !aSel || !appStudy )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SALOME_ListIO selected;
|
||||||
aSel->selectedObjects( selected );
|
aSel->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() )
|
if ( selected.IsEmpty() )
|
||||||
return;
|
return;
|
||||||
@ -988,7 +985,7 @@ namespace
|
|||||||
Handle(SALOME_InteractiveObject) anIObject = selected.First();
|
Handle(SALOME_InteractiveObject) anIObject = selected.First();
|
||||||
|
|
||||||
_PTR(Study) aStudy = appStudy->studyDS();
|
_PTR(Study) aStudy = appStudy->studyDS();
|
||||||
_PTR(SObject) aMainSObject( aStudy->FindObjectID( anIObject->getEntry() ) );
|
_PTR(SObject) aMainSObject = aStudy->FindObjectID( anIObject->getEntry() );
|
||||||
SMESH::SMESH_Mesh_var aMainObject = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIObject);
|
SMESH::SMESH_Mesh_var aMainObject = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIObject);
|
||||||
if ( aMainObject->_is_nil() )
|
if ( aMainObject->_is_nil() )
|
||||||
return;
|
return;
|
||||||
@ -1003,7 +1000,6 @@ namespace
|
|||||||
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ )
|
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ )
|
||||||
{
|
{
|
||||||
SMESH::SMESH_GroupBase_var aGroupObject = aListOfGroups[i];
|
SMESH::SMESH_GroupBase_var aGroupObject = aListOfGroups[i];
|
||||||
//SALOMEDS::Color aColor = aGroupObject->GetColor();
|
|
||||||
|
|
||||||
#ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors
|
#ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors
|
||||||
SALOMEDS::Color aColor = SMESHGUI::getPredefinedUniqueColor();
|
SALOMEDS::Color aColor = SMESHGUI::getPredefinedUniqueColor();
|
||||||
@ -1042,7 +1038,8 @@ namespace
|
|||||||
SMESH::RepaintCurrentView();
|
SMESH::RepaintCurrentView();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverallMeshQuality() {
|
void OverallMeshQuality()
|
||||||
|
{
|
||||||
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
||||||
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
@ -1127,11 +1124,15 @@ namespace
|
|||||||
Handle(SALOME_InteractiveObject) anIO = selected.First();
|
Handle(SALOME_InteractiveObject) anIO = selected.First();
|
||||||
if ( anIO->hasEntry() ) {
|
if ( anIO->hasEntry() ) {
|
||||||
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
|
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
|
||||||
if ( anActor && anActor->GetScalarBarActor() && anActor->GetControlMode() != SMESH_Actor::eNone ) {
|
if ( anActor &&
|
||||||
|
anActor->GetScalarBarActor() &&
|
||||||
|
anActor->GetControlMode() != SMESH_Actor::eNone )
|
||||||
|
{
|
||||||
SMESH_ScalarBarActor* aScalarBarActor = anActor->GetScalarBarActor();
|
SMESH_ScalarBarActor* aScalarBarActor = anActor->GetScalarBarActor();
|
||||||
SMESH::Controls::FunctorPtr aFunctor = anActor->GetFunctor();
|
SMESH::Controls::FunctorPtr aFunctor = anActor->GetFunctor();
|
||||||
if ( aScalarBarActor && aFunctor ) {
|
if ( aScalarBarActor && aFunctor ) {
|
||||||
SMESH::Controls::NumericalFunctor* aNumFun = dynamic_cast<SMESH::Controls::NumericalFunctor*>( aFunctor.get() );
|
SMESH::Controls::NumericalFunctor* aNumFun =
|
||||||
|
dynamic_cast<SMESH::Controls::NumericalFunctor*>( aFunctor.get() );
|
||||||
if ( aNumFun ) {
|
if ( aNumFun ) {
|
||||||
std::vector<int> elements;
|
std::vector<int> elements;
|
||||||
SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIO);
|
SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIO);
|
||||||
@ -1153,7 +1154,8 @@ namespace
|
|||||||
bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10;
|
bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10;
|
||||||
std::vector<int> nbEvents;
|
std::vector<int> nbEvents;
|
||||||
std::vector<double> funValues;
|
std::vector<double> funValues;
|
||||||
aNumFun->GetHistogram( nbIntervals, nbEvents, funValues, elements, minmax, isLogarithmic );
|
aNumFun->GetHistogram( nbIntervals, nbEvents, funValues,
|
||||||
|
elements, minmax, isLogarithmic );
|
||||||
QString anInitialPath = "";
|
QString anInitialPath = "";
|
||||||
if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
|
if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
|
||||||
anInitialPath = QDir::currentPath();
|
anInitialPath = QDir::currentPath();
|
||||||
@ -1188,7 +1190,8 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowElement(int theCommandID ) {
|
void ShowElement( int theCommandID )
|
||||||
|
{
|
||||||
LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
|
LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
if ( aSel )
|
if ( aSel )
|
||||||
@ -1198,7 +1201,10 @@ namespace
|
|||||||
Handle(SALOME_InteractiveObject) anIO = selected.First();
|
Handle(SALOME_InteractiveObject) anIO = selected.First();
|
||||||
if ( anIO->hasEntry() ) {
|
if ( anIO->hasEntry() ) {
|
||||||
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
|
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
|
||||||
if ( anActor && anActor->GetScalarBarActor() && anActor->GetControlMode() != SMESH_Actor::eNone ) {
|
if ( anActor &&
|
||||||
|
anActor->GetScalarBarActor() &&
|
||||||
|
anActor->GetControlMode() != SMESH_Actor::eNone )
|
||||||
|
{
|
||||||
SMESH_ScalarBarActor *aScalarBarActor = anActor->GetScalarBarActor();
|
SMESH_ScalarBarActor *aScalarBarActor = anActor->GetScalarBarActor();
|
||||||
if ( theCommandID == SMESHOp::OpShowDistribution ) {
|
if ( theCommandID == SMESHOp::OpShowDistribution ) {
|
||||||
aScalarBarActor->SetDistributionVisibility(!aScalarBarActor->GetDistributionVisibility());
|
aScalarBarActor->SetDistributionVisibility(!aScalarBarActor->GetDistributionVisibility());
|
||||||
@ -1212,8 +1218,10 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DISABLE_PLOT2DVIEWER
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
void PlotDistribution() {
|
void PlotDistribution()
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
{
|
||||||
|
SalomeApp_Application* app =
|
||||||
|
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if( !app )
|
if( !app )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1229,8 +1237,8 @@ namespace
|
|||||||
//because after call getViewManager( Plot2d_Viewer::Type(), true ) active window is Plot2d Viewer
|
//because after call getViewManager( Plot2d_Viewer::Type(), true ) active window is Plot2d Viewer
|
||||||
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
|
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
|
||||||
|
|
||||||
SUIT_ViewManager* aViewManager = app->getViewManager( Plot2d_Viewer::Type(), true ); // create if necessary
|
SUIT_ViewManager* aViewManager =
|
||||||
|
app->getViewManager( Plot2d_Viewer::Type(), true ); // create if necessary
|
||||||
if( !aViewManager )
|
if( !aViewManager )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1242,7 +1250,8 @@ namespace
|
|||||||
if ( !aPlot )
|
if ( !aPlot )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( anActor && anActor->GetControlMode() != SMESH_Actor::eNone ) {
|
if ( anActor && anActor->GetControlMode() != SMESH_Actor::eNone )
|
||||||
|
{
|
||||||
SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram();
|
SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram();
|
||||||
QString functorName = functorToString( anActor->GetFunctor());
|
QString functorName = functorToString( anActor->GetFunctor());
|
||||||
QString aHistogramName("%1 : %2");
|
QString aHistogramName("%1 : %2");
|
||||||
@ -1257,7 +1266,8 @@ namespace
|
|||||||
}
|
}
|
||||||
#endif //DISABLE_PLOT2DVIEWER
|
#endif //DISABLE_PLOT2DVIEWER
|
||||||
|
|
||||||
void DisableAutoColor(){
|
void DisableAutoColor()
|
||||||
|
{
|
||||||
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
if ( aSel )
|
if ( aSel )
|
||||||
@ -1272,13 +1282,14 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sortChildren(){
|
void sortChildren()
|
||||||
|
{
|
||||||
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
if ( aSel ) {
|
if ( aSel ) {
|
||||||
aSel->selectedObjects( selected );
|
aSel->selectedObjects( selected );
|
||||||
|
if ( selected.Extent() )
|
||||||
if(selected.Extent()){
|
{
|
||||||
Handle(SALOME_InteractiveObject) anIObject = selected.First();
|
Handle(SALOME_InteractiveObject) anIObject = selected.First();
|
||||||
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
|
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
|
||||||
_PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry());
|
_PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry());
|
||||||
@ -1294,7 +1305,8 @@ namespace
|
|||||||
void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap)
|
void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap)
|
||||||
{
|
{
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
SalomeApp_Application* app =
|
||||||
|
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if ( !app )
|
if ( !app )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1316,14 +1328,17 @@ namespace
|
|||||||
|
|
||||||
aSel->selectedObjects( selected );
|
aSel->selectedObjects( selected );
|
||||||
|
|
||||||
if(selected.Extent() >= 1){
|
if ( selected.Extent() >= 1 )
|
||||||
|
{
|
||||||
switch ( theCommandID ) {
|
switch ( theCommandID ) {
|
||||||
case SMESHOp::OpTransparency:{
|
case SMESHOp::OpTransparency:
|
||||||
|
{
|
||||||
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
||||||
(new SMESHGUI_TransparencyDlg( SMESHGUI::GetSMESHGUI() ))->show();
|
(new SMESHGUI_TransparencyDlg( SMESHGUI::GetSMESHGUI() ))->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case SMESHOp::OpProperties: {
|
case SMESHOp::OpProperties:
|
||||||
|
{
|
||||||
double color[3];
|
double color[3];
|
||||||
QColor faceColor, edgeColor, nodeColor, elem0dColor, ballColor;
|
QColor faceColor, edgeColor, nodeColor, elem0dColor, ballColor;
|
||||||
QColor orientationColor, outlineColor, volumeColor;
|
QColor orientationColor, outlineColor, volumeColor;
|
||||||
@ -1710,7 +1725,6 @@ namespace
|
|||||||
|
|
||||||
QString CheckHomogeneousSelection()
|
QString CheckHomogeneousSelection()
|
||||||
{
|
{
|
||||||
//SUIT_Study* aStudy = SMESH::GetActiveStudy();
|
|
||||||
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
if ( aSel )
|
if ( aSel )
|
||||||
@ -5112,7 +5126,8 @@ void SMESHGUI::createPreferences()
|
|||||||
QStringList aMarkerScaleValuesList;
|
QStringList aMarkerScaleValuesList;
|
||||||
for ( int i = VTK::MS_10; i <= VTK::MS_70; i++ ) {
|
for ( int i = VTK::MS_10; i <= VTK::MS_70; i++ ) {
|
||||||
aMarkerScaleIndicesList << i;
|
aMarkerScaleIndicesList << i;
|
||||||
aMarkerScaleValuesList << QString::number( (i-(int)VTK::MS_10)*0.5 + 1.0 );
|
//aMarkerScaleValuesList << QString::number( (i-(int)VTK::MS_10)*0.5 + 1.0 );
|
||||||
|
aMarkerScaleValuesList << QString::number( i );
|
||||||
}
|
}
|
||||||
setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
|
setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
|
||||||
setPreferenceProperty( markerScale, "indexes", aMarkerScaleIndicesList );
|
setPreferenceProperty( markerScale, "indexes", aMarkerScaleIndicesList );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user