mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
Issue 0019938 - fix problem with wrong filter selection (ptv)
This commit is contained in:
parent
751f23b3e0
commit
7ce6ef7ee9
@ -166,8 +166,8 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
|
||||
|
||||
ElementsLineEdit = new QLineEdit(GroupArguments);
|
||||
ElementsLineEdit->setValidator(myIdValidator);
|
||||
QPushButton* filterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(filterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
|
||||
// Controls for the whole mesh selection
|
||||
MeshCheck = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
|
||||
@ -276,7 +276,7 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
|
||||
GroupArgumentsLayout->addWidget(ElementsLab, 0, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
|
||||
GroupArgumentsLayout->addWidget(ElementsLineEdit, 0, 2);
|
||||
GroupArgumentsLayout->addWidget(filterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(myFilterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(MeshCheck, 1, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(PathGrp, 2, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(BasePointGrp, 3, 0, 1, 4);
|
||||
@ -1136,6 +1136,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::onSelectMesh()
|
||||
ElementsLineEdit->setValidator(toSelectMesh ? 0 : myIdValidator);
|
||||
ElementsLab->setText(toSelectMesh ? tr("SMESH_NAME") : tr("SMESH_ID_ELEMENTS"));
|
||||
ElementsLineEdit->clear();
|
||||
myFilterBtn->setEnabled(!toSelectMesh);
|
||||
|
||||
SetEditCurrentArgument(SelectElementsButton);
|
||||
}
|
||||
@ -1237,6 +1238,12 @@ void SMESHGUI_ExtrusionAlongPathDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_ExtrusionAlongPathDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
{
|
||||
QList<int> types;
|
||||
|
@ -140,6 +140,7 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
QPushButton* myFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
protected slots:
|
||||
|
@ -164,8 +164,8 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
|
||||
|
||||
LineEditElements = new QLineEdit(GroupArguments);
|
||||
LineEditElements->setValidator(myIdValidator);
|
||||
QPushButton* filterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(filterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
|
||||
// Control for the whole mesh selection
|
||||
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
|
||||
@ -207,7 +207,7 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
|
||||
GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
|
||||
GroupArgumentsLayout->addWidget(LineEditElements, 0, 2, 1, 5);
|
||||
GroupArgumentsLayout->addWidget(filterBtn, 0, 7);
|
||||
GroupArgumentsLayout->addWidget(myFilterBtn, 0, 7);
|
||||
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 8);
|
||||
GroupArgumentsLayout->addWidget(TextLabelDistance, 2, 0);
|
||||
GroupArgumentsLayout->addWidget(TextLabelDx, 2, 2);
|
||||
@ -784,6 +784,7 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||
else
|
||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||
myFilterBtn->setEnabled(!toSelectMesh);
|
||||
|
||||
if (myEditCurrentArgument != LineEditElements) {
|
||||
LineEditElements->clear();
|
||||
@ -850,6 +851,12 @@ void SMESHGUI_ExtrusionDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_ExtrusionDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
{
|
||||
QList<int> types;
|
||||
|
@ -131,6 +131,7 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
QPushButton* myFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
private slots:
|
||||
|
@ -2057,7 +2057,8 @@ SMESHGUI_FilterDlg::SMESHGUI_FilterDlg( SMESHGUI* theModule,
|
||||
const QList<int>& theTypes )
|
||||
: QDialog( SMESH::GetDesktop( theModule ) ),
|
||||
mySMESHGUI( theModule ),
|
||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||
myInitSourceWgOnApply( true )
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
mySelector = aViewWindow->GetSelector();
|
||||
@ -2073,7 +2074,8 @@ SMESHGUI_FilterDlg::SMESHGUI_FilterDlg( SMESHGUI* theModule,
|
||||
const int theType )
|
||||
: QDialog( SMESH::GetDesktop( theModule ) ),
|
||||
mySMESHGUI( theModule ),
|
||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||
myInitSourceWgOnApply( true )
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
mySelector = aViewWindow->GetSelector();
|
||||
@ -2609,9 +2611,11 @@ bool SMESHGUI_FilterDlg::isValid() const
|
||||
// Purpose : Set widget of parent dialog containing idsto be filtered if
|
||||
// user select corresponding source radio button
|
||||
//=======================================================================
|
||||
void SMESHGUI_FilterDlg::SetSourceWg (QWidget* theWg)
|
||||
void SMESHGUI_FilterDlg::SetSourceWg (QWidget* theWg,
|
||||
const bool initOnApply)
|
||||
{
|
||||
mySourceWg = theWg;
|
||||
myInitSourceWgOnApply = initOnApply;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -2637,7 +2641,7 @@ void SMESHGUI_FilterDlg::SetSelection()
|
||||
|
||||
if (mySelectionMgr) {
|
||||
myIObjects.Clear();
|
||||
const SALOME_ListIO& anObjs = mySelector->StoredIObjects();
|
||||
const SALOME_ListIO& anObjs = mySelector->StoredIObjects();
|
||||
SALOME_ListIteratorOfListIO anIter (anObjs);
|
||||
for ( ; anIter.More(); anIter.Next()) {
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
@ -2674,9 +2678,11 @@ bool SMESHGUI_FilterDlg::onApply()
|
||||
if (!myFilter[ aCurrType ]->GetPredicate()->_is_nil()) {
|
||||
QList<int> aResultIds;
|
||||
filterSource(aCurrType, aResultIds);
|
||||
// select in viewer
|
||||
selectInViewer(aCurrType, aResultIds);
|
||||
}
|
||||
|
||||
|
||||
myInsertState[ aCurrType ] = mySetInViewer->isChecked();
|
||||
myApplyToState[ aCurrType ] = mySourceGrp->checkedId();
|
||||
}
|
||||
@ -2792,10 +2798,10 @@ void SMESHGUI_FilterDlg::filterSource (const int theType,
|
||||
for (anIter = aDialogIds.begin(); anIter != aDialogIds.end(); ++ anIter)
|
||||
if (aPred->IsSatisfy(*anIter))
|
||||
theResIds.append(*anIter);
|
||||
|
||||
// set ids to the dialog
|
||||
setIdsToWg(mySourceWg, theResIds);
|
||||
}
|
||||
// set ids to the dialog
|
||||
if (myInitSourceWgOnApply || aSourceId == Dialog)
|
||||
setIdsToWg(mySourceWg, theResIds);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -223,7 +223,7 @@ public:
|
||||
|
||||
void SetSelection();
|
||||
void SetMesh (SMESH::SMESH_Mesh_var);
|
||||
void SetSourceWg( QWidget* );
|
||||
void SetSourceWg( QWidget*, const bool initOnApply = true );
|
||||
|
||||
static SMESH::Filter::Criterion createCriterion();
|
||||
|
||||
@ -285,6 +285,7 @@ private:
|
||||
LightApp_SelectionMgr* mySelectionMgr;
|
||||
SVTK_Selector* mySelector;
|
||||
SMESH::SMESH_Mesh_var myMesh;
|
||||
bool myInitSourceWgOnApply;
|
||||
QWidget* mySourceWg;
|
||||
|
||||
SALOME_DataMapOfIOMapOfInteger myIObjects;
|
||||
|
@ -1395,6 +1395,13 @@ void SMESHGUI_GroupDlg::setCurrentSelection()
|
||||
//=================================================================================
|
||||
void SMESHGUI_GroupDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
|
||||
SMESH::ElementType aType = SMESH::ALL;
|
||||
switch ( myTypeId )
|
||||
{
|
||||
@ -1415,7 +1422,7 @@ void SMESHGUI_GroupDlg::setFilters()
|
||||
|
||||
myFilterDlg->SetSelection();
|
||||
myFilterDlg->SetMesh( myMesh );
|
||||
myFilterDlg->SetSourceWg( myElements );
|
||||
myFilterDlg->SetSourceWg( myElements, false );
|
||||
|
||||
myFilterDlg->show();
|
||||
}
|
||||
|
@ -507,6 +507,12 @@ void SMESHGUI_RemoveElementsDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_RemoveElementsDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
|
@ -514,6 +514,12 @@ void SMESHGUI_RemoveNodesDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_RemoveNodesDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::NODE );
|
||||
|
||||
|
@ -144,8 +144,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
|
||||
|
||||
LineEditElements = new QLineEdit(GroupArguments);
|
||||
LineEditElements->setValidator(myIdValidator);
|
||||
QPushButton* filterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(filterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
|
||||
// Control for the whole mesh selection
|
||||
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
|
||||
@ -238,7 +238,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
|
||||
GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
|
||||
GroupArgumentsLayout->addWidget(LineEditElements, 0, 2);
|
||||
GroupArgumentsLayout->addWidget(filterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(myFilterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(GroupAxis, 2, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(GroupAngleBox, 3, 0, 1, 4);
|
||||
@ -932,6 +932,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||
else
|
||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||
myFilterBtn->setEnabled(!toSelectMesh);
|
||||
|
||||
if (myEditCurrentArgument != LineEditElements) {
|
||||
LineEditElements->clear();
|
||||
@ -1144,6 +1145,12 @@ void SMESHGUI_RevolutionDlg::onSelectVectorMenu( QAction* action){
|
||||
//=================================================================================
|
||||
void SMESHGUI_RevolutionDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
{
|
||||
QList<int> types;
|
||||
|
@ -153,6 +153,7 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
QPushButton* myFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
private slots:
|
||||
|
@ -133,8 +133,8 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule )
|
||||
SelectElementsButton->setIcon(image1);
|
||||
LineEditElements = new QLineEdit(GroupArguments);
|
||||
LineEditElements->setValidator(myIdValidator);
|
||||
QPushButton* filterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(filterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
|
||||
// Control for the whole mesh selection
|
||||
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
|
||||
@ -215,7 +215,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule )
|
||||
GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
|
||||
GroupArgumentsLayout->addWidget(LineEditElements, 0, 2, 1, 1);
|
||||
GroupArgumentsLayout->addWidget(filterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(myFilterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(GroupAxis, 2, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(TextLabelAngle, 3, 0, 1, 2);
|
||||
@ -845,6 +845,7 @@ void SMESHGUI_RotationDlg::onSelectMesh (bool toSelectMesh)
|
||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||
else
|
||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||
myFilterBtn->setEnabled(!toSelectMesh);
|
||||
|
||||
if (myEditCurrentArgument != LineEditElements) {
|
||||
LineEditElements->clear();
|
||||
@ -974,6 +975,12 @@ void SMESHGUI_RotationDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_RotationDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
|
@ -131,6 +131,7 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
QPushButton* myFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
private slots:
|
||||
|
@ -137,8 +137,8 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
|
||||
|
||||
LineEditElements = new QLineEdit(GroupArguments);
|
||||
LineEditElements->setValidator(myIdValidator);
|
||||
QPushButton* filterElemBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(filterElemBtn, SIGNAL(clicked()), this, SLOT(setElemFilters()));
|
||||
myElemFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(myElemFilterBtn, SIGNAL(clicked()), this, SLOT(setElemFilters()));
|
||||
|
||||
// Control for the whole mesh selection
|
||||
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
|
||||
@ -175,7 +175,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
|
||||
GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
|
||||
GroupArgumentsLayout->addWidget(LineEditElements, 0, 2);
|
||||
GroupArgumentsLayout->addWidget(filterElemBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(myElemFilterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(TextLabelNodes, 2, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectNodesButton, 2, 1);
|
||||
@ -727,6 +727,7 @@ void SMESHGUI_SmoothingDlg::onSelectMesh (bool toSelectMesh)
|
||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||
else
|
||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||
myElemFilterBtn->setEnabled(!toSelectMesh);
|
||||
|
||||
if (myEditCurrentArgument != LineEditElements &&
|
||||
myEditCurrentArgument != LineEditNodes) {
|
||||
@ -779,6 +780,12 @@ void SMESHGUI_SmoothingDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_SmoothingDlg::setFilters( const bool theIsElem )
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
{
|
||||
QList<int> types;
|
||||
|
@ -116,7 +116,8 @@ private:
|
||||
QCheckBox* CheckBoxParametric;
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
|
||||
QPushButton* myElemFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
private slots:
|
||||
|
@ -144,8 +144,8 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
|
||||
SelectElementsButton->setIcon(image3);
|
||||
LineEditElements = new QLineEdit(GroupArguments);
|
||||
LineEditElements->setValidator(myIdValidator);
|
||||
QPushButton* filterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(filterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
|
||||
// Control for the whole mesh selection
|
||||
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
|
||||
@ -224,7 +224,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
|
||||
GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
|
||||
GroupArgumentsLayout->addWidget(LineEditElements, 0, 2, 1, 1);
|
||||
GroupArgumentsLayout->addWidget(filterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(myFilterBtn, 0, 3);
|
||||
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(GroupMirror, 2, 0, 1, 4);
|
||||
GroupArgumentsLayout->addWidget(ActionBox, 3, 0, 3, 3);
|
||||
@ -931,6 +931,7 @@ void SMESHGUI_SymmetryDlg::onSelectMesh (bool toSelectMesh)
|
||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||
else
|
||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||
myFilterBtn->setEnabled(!toSelectMesh);
|
||||
|
||||
if (myEditCurrentArgument != LineEditElements) {
|
||||
LineEditElements->clear();
|
||||
@ -1073,6 +1074,12 @@ void SMESHGUI_SymmetryDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_SymmetryDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
|
@ -133,6 +133,7 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
QPushButton* myFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
private slots:
|
||||
|
@ -156,8 +156,8 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule )
|
||||
SelectElementsButton->setIcon(image2);
|
||||
LineEditElements = new QLineEdit(GroupArguments);
|
||||
LineEditElements->setValidator(myIdValidator);
|
||||
QPushButton* filterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(filterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
|
||||
connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
|
||||
|
||||
// Control for the whole mesh selection
|
||||
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
|
||||
@ -214,7 +214,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule )
|
||||
GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
|
||||
GroupArgumentsLayout->addWidget(LineEditElements, 0, 2, 1, 5);
|
||||
GroupArgumentsLayout->addWidget(filterBtn, 0, 7);
|
||||
GroupArgumentsLayout->addWidget(myFilterBtn, 0, 7);
|
||||
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 8);
|
||||
GroupArgumentsLayout->addWidget(TextLabel1, 2, 0);
|
||||
GroupArgumentsLayout->addWidget(SelectButton1, 2, 1);
|
||||
@ -910,6 +910,7 @@ void SMESHGUI_TranslationDlg::onSelectMesh (bool toSelectMesh)
|
||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||
else
|
||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||
myFilterBtn->setEnabled(!toSelectMesh);
|
||||
|
||||
if (myEditCurrentArgument != LineEditElements) {
|
||||
LineEditElements->clear();
|
||||
@ -1021,6 +1022,12 @@ void SMESHGUI_TranslationDlg::keyPressEvent( QKeyEvent* e )
|
||||
//=================================================================================
|
||||
void SMESHGUI_TranslationDlg::setFilters()
|
||||
{
|
||||
if(myMesh->_is_nil()) {
|
||||
SUIT_MessageBox::critical(this,
|
||||
tr("SMESH_ERROR"),
|
||||
tr("NO_MESH_SELECTED"));
|
||||
return;
|
||||
}
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
|
@ -130,6 +130,7 @@ private:
|
||||
|
||||
QString myHelpFileName;
|
||||
|
||||
QPushButton* myFilterBtn;
|
||||
SMESHGUI_FilterDlg* myFilterDlg;
|
||||
|
||||
private slots:
|
||||
|
@ -2903,6 +2903,10 @@ Consider saving your work before application crash</translation>
|
||||
<source>SMESH_DRS_SOME_EMPTY</source>
|
||||
<translation>One or more mesh files were empty, data has not been published</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NO_MESH_SELECTED</source>
|
||||
<translation>No mesh selected</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI</name>
|
||||
|
Loading…
Reference in New Issue
Block a user