From: mzn Date: Mon, 27 Jun 2005 05:45:12 +0000 (+0000) Subject: To avoid exception, if the list of selected objects is empty. X-Git-Tag: T3_0_0_a4~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4401d3e8dbd023980ca2bd56a1dcb1e12dbd194a;p=modules%2Fsmesh.git To avoid exception, if the list of selected objects is empty. --- diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index 047781d20..e896c4e6c 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -516,6 +516,8 @@ void SMESHGUI_MeshPatternDlg::onSelectionDone() } else if (mySelInput == Ids) { SALOME_ListIO aList; mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type()); + if (aList.Extent() != 1) + return; QString anIds; if (!SMESH::GetNameOfSelectedElements(mySelector, aList.First(), anIds))