-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
::StdMeshersGUI_SubShapeSelectorWdg( QWidget * parent,
TopAbs_ShapeEnum subShType,
const bool toShowList,
- const bool toShowActivateBtn ):
+ const bool toShowActivateBtn,
+ const int minListWidth ):
QWidget( parent ),
myMaxSize( -1 ),
myPreviewActor( 0 )
myAddButton = new QPushButton( tr( "SMESH_BUT_ADD" ), this );
myRemoveButton = new QPushButton( tr( "SMESH_BUT_REMOVE" ), this );
myListWidget->setSelectionMode( QListWidget::ExtendedSelection );
- myListWidget->setMinimumWidth(300);
- myListWidget->setWrapping(true);
+ myListWidget->setMinimumWidth( minListWidth );
+ myListWidget->setWrapping( true );
myActivateButton->setCheckable( true );
}
else
}
}
+//================================================================================
+/*!
+ * \brief Connect selection slots
+ * \param other - another StdMeshersGUI_ObjectReferenceParamWdg
+ */
+//================================================================================
+
+void StdMeshersGUI_SubShapeSelectorWdg::
+AvoidSimultaneousSelection ( StdMeshersGUI_SubShapeSelectorWdg* other)
+{
+ connect(other, SIGNAL(selectionActivated()), this, SLOT(deactivateSelection()));
+ connect(this, SIGNAL(selectionActivated()), other, SLOT(deactivateSelection()));
+}
+
//================================================================================
/*!
* \brief Connect/disconnect to change of selection
if ( toActivate )
{
- connect( mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(selectionIntoArgument()));
+ connect( mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(selectionIntoArgument()));
}
else
{
if ( sender() == myActivateButton )
ShowPreview( toActivate );
+
+ if ( toActivate )
+ emit selectionActivated();
}
//================================================================================