StdMeshersGUI_SubShapeSelectorWdg
::StdMeshersGUI_SubShapeSelectorWdg( QWidget * parent ):
QWidget( parent ),
- myPreviewActor( 0 )
+ myPreviewActor( 0 ),
+ myMaxSize( 0 )
{
QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) );
setLayout( edgesLayout );
setMinimumWidth( 300 );
- myMaxSize = 1000;
mySubShType = TopAbs_EDGE;
init();
return;
myListWidget->blockSignals( true );
- for (int i = 0; i < mySelectedIDs.size(); i++) {
+ for (int i = 0; i < mySelectedIDs.size() && (myMaxSize < 1 || myListOfIDs.size() < myMaxSize); i++) {
if ( myListOfIDs.indexOf( mySelectedIDs.at(i) ) == -1 ) {
QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
}
}
onListSelectionChanged();
-
myListWidget->blockSignals( false );
-
- if( myListOfIDs.size() >= myMaxSize )
- myAddButton->setEnabled( false );
+ myAddButton->setEnabled( myListOfIDs.size() < myMaxSize );
}
//=================================================================================