From: eap Date: Wed, 28 Oct 2015 16:11:56 +0000 (+0300) Subject: IPAL52934: Elements are't not highlighted in vtk viewer after set id in measurements... X-Git-Tag: V8_0_pre~6 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=387ee093834ff8105e02cf017f0823d09c0412f9;hp=219f1c3410ef3fab8f5a5abe3539a12d6170079d 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 --- 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 );