54250: Wrong group contents after SplitQuad()

+ fix a bug that in Split Quadrangles dialog it's impossible to add a
  quadrangle from a group
This commit is contained in:
eap 2017-06-23 15:08:46 +03:00
parent e956f25bc6
commit 7647033197
5 changed files with 10 additions and 9 deletions

View File

@ -163,7 +163,7 @@ bool SMDS_MeshGroup::Remove(const SMDS_MeshElement * theElem)
bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const
{
return myElements.find(theElem)!=myElements.end();
return myElements.find(theElem) != myElements.end();
}
//=======================================================================

View File

@ -51,7 +51,7 @@ SMESHDS_GroupBase::SMESHDS_GroupBase (const int theID,
//=============================================================================
/*!
*
* Don't use it!
*/
//=============================================================================

View File

@ -69,7 +69,7 @@ class SMESHDS_EXPORT SMESHDS_GroupBase
virtual SMDS_ElemIteratorPtr GetElements() const = 0;
virtual int GetID (const int theIndex);
// use it for iterations 1..Extent()
// DON'T use it for iterations 1..Extent()
virtual int GetTic() const = 0;

View File

@ -974,18 +974,18 @@ void SMESHGUI_MultiEditDlg::setSelectionMode()
}
if (entityType()) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(VolumeSelection);
SMESH::SetFilter(new SMESHGUI_VolumesFilter());
} else {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(FaceSelection);
aViewWindow->SetSelectionMode(VolumeSelection); // here myActor set to a filter
} else {
if (myFilterType == SMESH::TriaFilter)
SMESH::SetFilter(new SMESHGUI_TriangleFilter());
else if (myFilterType == SMESH::QuadFilter)
SMESH::SetFilter(new SMESHGUI_QuadrangleFilter());
else
SMESH::SetFilter(new SMESHGUI_FacesFilter());
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(FaceSelection); // here myActor set to a filter
}
}

View File

@ -474,8 +474,9 @@ SMESH::long_array* SMESH_GroupBase_i::GetListOfID()
{
int aSize = aGroupDS->Extent();
aRes->length(aSize);
for (int i = 0; i < aSize; i++)
aRes[i] = aGroupDS->GetID(i+1);
SMDS_ElemIteratorPtr it = aGroupDS->GetElements();
for (int i = 0; it->more(); i++)
aRes[i] = it->next()->GetID();
if ( 0 < aSize && aSize < 100 ) // for comfortable testing ;)
std::sort( &aRes[0], &aRes[0]+aSize );