mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-13 17:18:35 +05:00
Merge branch 'master' into V9_3_BR
This commit is contained in:
commit
e6d5ea2c9a
@ -1144,6 +1144,9 @@ void SMESHGUI_MergeDlg::SetEditCurrentArgument()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_MergeDlg::SelectionIntoArgument()
|
void SMESHGUI_MergeDlg::SelectionIntoArgument()
|
||||||
{
|
{
|
||||||
|
if ( myIsBusy )
|
||||||
|
return;
|
||||||
|
|
||||||
if (myEditCurrentArgument == (QWidget*)LineEditMesh)
|
if (myEditCurrentArgument == (QWidget*)LineEditMesh)
|
||||||
{
|
{
|
||||||
QString aString = "";
|
QString aString = "";
|
||||||
@ -1222,6 +1225,9 @@ void SMESHGUI_MergeDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
LineEditMesh->setText( aString );
|
LineEditMesh->setText( aString );
|
||||||
|
|
||||||
|
|
||||||
|
myIsBusy = true; // here selection can change
|
||||||
|
|
||||||
if (myAction == MERGE_NODES) {
|
if (myAction == MERGE_NODES) {
|
||||||
SMESH::SetPointRepresentation(true);
|
SMESH::SetPointRepresentation(true);
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
@ -1231,6 +1237,8 @@ void SMESHGUI_MergeDlg::SelectionIntoArgument()
|
|||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(CellSelection);
|
aViewWindow->SetSelectionMode(CellSelection);
|
||||||
|
|
||||||
|
myIsBusy = false;
|
||||||
|
|
||||||
// process groups
|
// process groups
|
||||||
myGroups.clear();
|
myGroups.clear();
|
||||||
ListExclude->clear();
|
ListExclude->clear();
|
||||||
@ -1408,9 +1416,11 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id)
|
|||||||
|
|
||||||
myIdPreview->SetPointsLabeled(false);
|
myIdPreview->SetPointsLabeled(false);
|
||||||
SMESH::SetPointRepresentation(false);
|
SMESH::SetPointRepresentation(false);
|
||||||
|
myIsBusy = true; // keep currently selected mesh
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(ActorSelection);
|
aViewWindow->SetSelectionMode(ActorSelection);
|
||||||
mySelectionMgr->clearFilters();
|
mySelectionMgr->clearFilters();
|
||||||
|
myIsBusy = false;
|
||||||
GroupCoincident->hide();
|
GroupCoincident->hide();
|
||||||
GroupEdit->hide();
|
GroupEdit->hide();
|
||||||
|
|
||||||
@ -1424,6 +1434,7 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id)
|
|||||||
|
|
||||||
myMeshOrSubMeshOrGroupFilter = new SMESH_TypeFilter (SMESH::IDSOURCE);
|
myMeshOrSubMeshOrGroupFilter = new SMESH_TypeFilter (SMESH::IDSOURCE);
|
||||||
|
|
||||||
|
myIsBusy = true; // keep currently selected mesh
|
||||||
if (myAction == MERGE_NODES) {
|
if (myAction == MERGE_NODES) {
|
||||||
SMESH::SetPointRepresentation(true);
|
SMESH::SetPointRepresentation(true);
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
@ -1435,11 +1446,14 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id)
|
|||||||
if( mySelector->IsSelectionEnabled() )
|
if( mySelector->IsSelectionEnabled() )
|
||||||
aViewWindow->SetSelectionMode(CellSelection);
|
aViewWindow->SetSelectionMode(CellSelection);
|
||||||
}
|
}
|
||||||
|
myIsBusy = false;
|
||||||
GroupCoincident->show();
|
GroupCoincident->show();
|
||||||
GroupEdit->show();
|
GroupEdit->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SelectionIntoArgument();
|
|
||||||
|
if ( myMesh->_is_nil() )
|
||||||
|
SelectionIntoArgument();
|
||||||
|
|
||||||
updateControls();
|
updateControls();
|
||||||
|
|
||||||
|
@ -5060,40 +5060,33 @@ bool _pyStringFamily::Add( const char* str )
|
|||||||
const int minPrefixSize = 4;
|
const int minPrefixSize = 4;
|
||||||
|
|
||||||
// count "smaller" strings with the same prefix
|
// count "smaller" strings with the same prefix
|
||||||
std::list< _AString >::iterator itLess = itStr; --itLess;
|
|
||||||
int nbLess = 0;
|
int nbLess = 0;
|
||||||
for ( ; itLess != _strings.end(); --itLess )
|
std::list< _AString >::iterator itLess = itStr;
|
||||||
|
while ( itLess != _strings.begin() )
|
||||||
|
{
|
||||||
|
--itLess;
|
||||||
if ( strncmp( str, itLess->ToCString(), minPrefixSize ) == 0 )
|
if ( strncmp( str, itLess->ToCString(), minPrefixSize ) == 0 )
|
||||||
++nbLess;
|
++nbLess;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
++itLess;
|
||||||
break;
|
break;
|
||||||
++itLess;
|
}
|
||||||
|
}
|
||||||
|
// itLess points to the 1st string with same prefix
|
||||||
|
|
||||||
// count "greater" strings with the same prefix
|
// count "greater" strings with the same prefix
|
||||||
std::list< _AString >::iterator itMore = itStr;
|
|
||||||
int nbMore = 0;
|
int nbMore = 0;
|
||||||
|
std::list< _AString >::iterator itMore = itStr;
|
||||||
for ( ; itMore != _strings.end(); ++itMore )
|
for ( ; itMore != _strings.end(); ++itMore )
|
||||||
if ( strncmp( str, itMore->ToCString(), minPrefixSize ) == 0 )
|
if ( strncmp( str, itMore->ToCString(), minPrefixSize ) == 0 )
|
||||||
++nbMore;
|
++nbMore;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
--itMore;
|
// itMore points to the 1st string with greater prefix
|
||||||
|
|
||||||
if ( nbLess + nbMore > 1 ) // ------- ADD a NEW CHILD FAMILY -------------
|
if ( nbLess + nbMore > 1 ) // ------- ADD a NEW CHILD FAMILY -------------
|
||||||
{
|
{
|
||||||
// look for a maximal prefix length
|
|
||||||
// int lessPrefSize = 3, morePrefSize = 3;
|
|
||||||
// if ( nbLess > 0 )
|
|
||||||
// while( itLess->ToCString()[ lessPrefSize ] == str[ lessPrefSize ] )
|
|
||||||
// ++lessPrefSize;
|
|
||||||
// if ( nbMore > 0 )
|
|
||||||
// while ( itMore->ToCString()[ morePrefSize ] == str[ morePrefSize ] )
|
|
||||||
// ++morePrefSize;
|
|
||||||
// int prefixSize = 3;
|
|
||||||
// if ( nbLess == 0 )
|
|
||||||
// prefixSize = morePrefSize;
|
|
||||||
// else if ( nbMore == 0 )
|
|
||||||
// prefixSize = lessPrefSize;
|
|
||||||
// else
|
|
||||||
// prefixSize = Min( lessPrefSize, morePrefSize );
|
|
||||||
int prefixSize = minPrefixSize;
|
int prefixSize = minPrefixSize;
|
||||||
_AString newPrefix ( str, prefixSize );
|
_AString newPrefix ( str, prefixSize );
|
||||||
|
|
||||||
@ -5114,7 +5107,7 @@ bool _pyStringFamily::Add( const char* str )
|
|||||||
for ( ; nbMore > 0; --nbMore, ++itStr )
|
for ( ; nbMore > 0; --nbMore, ++itStr )
|
||||||
newSubFam._strings.push_back( itStr->ToCString() + prefixSize );
|
newSubFam._strings.push_back( itStr->ToCString() + prefixSize );
|
||||||
|
|
||||||
_strings.erase( itLess, ++itMore );
|
_strings.erase( itLess, itMore );
|
||||||
}
|
}
|
||||||
else // too few string to make a family for them
|
else // too few string to make a family for them
|
||||||
{
|
{
|
||||||
|
@ -1009,9 +1009,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
|||||||
|
|
||||||
lines.push_back( aSMESHGen + " = smeshBuilder.New()" );
|
lines.push_back( aSMESHGen + " = smeshBuilder.New()" );
|
||||||
if ( isPublished )
|
if ( isPublished )
|
||||||
optionalComment = helper + "#";
|
optionalComment = "#";
|
||||||
lines.push_back( optionalComment + aSMESHGen + ".SetEnablePublish( False ) # Set to False to avoid publish in study if not needed or in some particular situations:" );
|
lines.push_back( optionalComment + aSMESHGen + ".SetEnablePublish( False ) # Set to False to avoid publish in study if not needed or in some particular situations:" );
|
||||||
lines.push_back( " # multiples meshes built in parallel, complex and numerous mesh edition (performance)" );
|
lines.push_back( " # multiples meshes built in parallel, complex and numerous mesh edition (performance)\n" );
|
||||||
lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" );
|
lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" );
|
||||||
lines.push_back( helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()" );
|
lines.push_back( helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()" );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user