From 387ee093834ff8105e02cf017f0823d09c0412f9 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 28 Oct 2015 19:11:56 +0300 Subject: [PATCH] IPAL52934: Elements are't not highlighted in vtk viewer after set id in measurements dialog box Fix SMESHGUI_Measurements.cxx In "Build Compound Mesh", set "Merge coincident nodes and elements" ON by default after reflection about a question on the Forum http://www.salome-platform.org/forum/forum_11/866636535 Change SMESHGUI_BuildCompoundDlg.cxx --- src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_Measurements.cxx | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx index 90f42ee45..ae1f5ad3f 100644 --- a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx @@ -228,7 +228,7 @@ void SMESHGUI_BuildCompoundDlg::Init() ComboBoxUnion->addItem(tr("RENAME")); ComboBoxUnion->setCurrentIndex(0); - CheckBoxMerge->setChecked(false); + CheckBoxMerge->setChecked(true); TextLabelTol->setEnabled(CheckBoxMerge->isChecked()); SpinBoxTol->SetValue(1e-05); diff --git a/src/SMESHGUI/SMESHGUI_Measurements.cxx b/src/SMESHGUI/SMESHGUI_Measurements.cxx index e2d3b5b01..4b30659eb 100644 --- a/src/SMESHGUI/SMESHGUI_Measurements.cxx +++ b/src/SMESHGUI/SMESHGUI_Measurements.cxx @@ -198,6 +198,7 @@ SMESHGUI_MinDistance::SMESHGUI_MinDistance( QWidget* parent ) clear(); //setTarget( FirstTgt ); + selectionChanged(); } /*! @@ -500,13 +501,21 @@ void SMESHGUI_MinDistance::secondEdited() setTarget( SecondTgt ); if ( sender() == mySecondTgt ) clear(); + QString text = mySecondTgt->text(); + if ( !mySecondActor ) + { + selectionChanged(); + mySecondTgt->setText( text ); + } SVTK_Selector* selector = SMESH::GetViewWindow()->GetSelector(); if ( mySecondActor && selector ) { Handle(SALOME_InteractiveObject) IO = mySecondActor->getIO(); if ( mySecond->checkedId() == NodeTgt || mySecond->checkedId() == ElementTgt ) { - TColStd_MapOfInteger ID; - ID.Add( mySecondTgt->text().toLong() ); - selector->AddOrRemoveIndex( IO, ID, false ); + if ( !text.isEmpty() ) { + TColStd_MapOfInteger ID; + ID.Add( text.toLong() ); + selector->AddOrRemoveIndex( IO, ID, false ); + } } if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() ) aViewWindow->highlight( IO, true, true ); -- 2.39.2