From 3dd9e6ddb38af2ffe09437e323d83ca3aea1b653 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 23 Jul 2021 18:03:09 +0300 Subject: [PATCH] regression with bos #24400 [CEA] Option in SALOME for not storing in med files the indices (number of nodes) Store number in study, else IDs of elements change + In Mesh Info dlg, set size of IDs in the viewer from preference --- src/SMESHGUI/SMESHGUI_IdPreview.cxx | 19 ++++++++++++++----- src/SMESH_I/SMESH_Gen_i.cxx | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_IdPreview.cxx b/src/SMESHGUI/SMESHGUI_IdPreview.cxx index 4b591481a..fd7df6000 100644 --- a/src/SMESHGUI/SMESHGUI_IdPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_IdPreview.cxx @@ -22,8 +22,11 @@ #include "SMESHGUI_IdPreview.h" -#include #include + +#include +#include +#include #include #include @@ -71,21 +74,27 @@ SMESHGUI_IdPreview::SMESHGUI_IdPreview(SVTK_ViewWindow* theViewWindow): myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort()); myPtsSelectVisiblePoints->SelectInvisibleOff(); myPtsSelectVisiblePoints->SetTolerance(0.1); - + myPtsLabeledDataMapper = vtkLabeledDataMapper::New(); myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort()); myPtsLabeledDataMapper->SetLabelModeToLabelScalars(); - + vtkTextProperty* aPtsTextProp = vtkTextProperty::New(); aPtsTextProp->SetFontFamilyToTimes(); - static int aPointsFontSize = 12; + int aPointsFontSize = 12; + if ( SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr() ) + if ( mgr->hasValue( "SMESH", "numbering_node_font" ) ) + { + QFont f = mgr->fontValue( "SMESH", "numbering_node_font" ); + aPointsFontSize = f.pointSize(); + } aPtsTextProp->SetFontSize(aPointsFontSize); aPtsTextProp->SetBold(1); aPtsTextProp->SetItalic(0); aPtsTextProp->SetShadow(0); myPtsLabeledDataMapper->SetLabelTextProperty(aPtsTextProp); aPtsTextProp->Delete(); - + myIsPointsLabeled = false; myPointLabels = vtkActor2D::New(); diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 8b0f40c39..f997c096c 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -4208,7 +4208,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, // MED writer to be used by storage process DriverMED_W_SMESHDS_Mesh writer; writer.SetFile( meshfile.ToCString() ); - writer.SetSaveNumbers( false ); // bos #24400 + //writer.SetSaveNumbers( false ); // bos #24400 -- it leads to change of element IDs // IMP issue 20918 // SetStoreName() to groups before storing hypotheses to let them refer to -- 2.39.2