connect(SelectElementsButton, SIGNAL( clicked() ), SLOT( SetEditCurrentArgument() ) );
connect(LineEditElements, SIGNAL( textChanged(const QString&) ), SLOT(onTextChange(const QString&)));
- connect(myFacesByNodes, SIGNAL(selectionChanged()), this, SLOT(onListSelectionChanged()));
+ connect(myFacesByNodes, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
connect(AddButton, SIGNAL(clicked()), this, SLOT(onAdd()));
connect(RemoveButton, SIGNAL(clicked()), this, SLOT(onRemove()));
SMESHGUI::Modified();
}
+ myFacesByNodes->clear();
}
//=================================================================================
myNbOkElements = 1;
myEditCurrentArgument->clear();
AddButton->setEnabled(false);
- buttonOk->setEnabled( true );
- if(myFacesByNodes->count()>1) buttonApply->setEnabled( true );
+ buttonApply->setEnabled( myFacesByNodes->count() > 1 );
+ buttonOk->setEnabled( myFacesByNodes->count() > 1 );
}
busy = false;
onListSelectionChanged();
if (aCompareItem->count() > 0)
aCompareItem->clear();
aTable->setEditable(false, row, 1);
+ aTable->item(row, 2)->setText( QString("") );
aTable->setEditable(aCriterionType == SMESH::FT_GroupColor ||
aCriterionType == SMESH::FT_ElemGeomType ||
aCriterionType == SMESH::FT_CoplanarFaces, row, 2);
//=======================================================================
void SMESHGUI_FilterDlg::updateMainButtons()
{
+ myButtons[ BTN_Close ]->show();
if (myTypes.count() == 1)
{
- myButtons[ BTN_Cancel ]->show();
myButtons[ BTN_Apply ]->hide();
- myButtons[ BTN_Close ]->hide();
}
else
{
- myButtons[ BTN_Cancel ]->hide();
myButtons[ BTN_Apply ]->show();
- myButtons[ BTN_Close ]->show();
}
-
// updateGeometry();
}
myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp);
myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp);
- myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp);
myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp);
myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp);
aLay->addWidget(myButtons[ BTN_Apply ]);
aLay->addSpacing(10);
aLay->addStretch();
- aLay->addWidget(myButtons[ BTN_Cancel ]);
aLay->addWidget(myButtons[ BTN_Close ]);
aLay->addWidget(myButtons[ BTN_Help ]);
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
- connect(myButtons[ BTN_Cancel ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
mySelectionMgr->clearFilters();
int aRow, aCol;
-
+
+ bool isCurrentCell = myTable->CurrentCell(aRow, aCol);
int aCriterionType = myTable->GetCriterionType(aRow);
- if (myTable->CurrentCell(aRow, aCol) &&
+ if ( isCurrentCell &&
(aCriterionType == SMESH::FT_BelongToGeom ||
aCriterionType == SMESH::FT_BelongToPlane ||
aCriterionType == SMESH::FT_BelongToCylinder ||
enum { Mesh, Selection, Dialog, None };
// Buttons
- enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help };
+ enum { BTN_OK, BTN_Apply, BTN_Close, BTN_Help };
public:
SMESHGUI_FilterDlg( SMESHGUI*, const QList<int>& );
myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp);
myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp);
- myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp);
myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp);
myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp);
aLay->addWidget(myButtons[ BTN_Apply ]);
aLay->addSpacing(10);
aLay->addStretch();
- aLay->addWidget(myButtons[ BTN_Cancel ]);
aLay->addWidget(myButtons[ BTN_Close ]);
aLay->addWidget(myButtons[ BTN_Help ]);
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
- connect(myButtons[ BTN_Cancel ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
//=======================================================================
void SMESHGUI_FilterLibraryDlg::updateMainButtons()
{
+ myButtons[ BTN_Close ]->show();
if (myTypes.count() == 1) {
- myButtons[ BTN_Cancel ]->show();
myButtons[ BTN_Apply ]->hide();
- myButtons[ BTN_Close ]->hide();
} else {
- myButtons[ BTN_Cancel ]->hide();
myButtons[ BTN_Apply ]->show();
- myButtons[ BTN_Close ]->show();
}
}
Q_OBJECT
// Buttons
- enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help };
+ enum { BTN_OK, BTN_Apply, BTN_Close, BTN_Help };
class Dialog;
GroupC1Layout->setMargin( MARGIN );
TextLabelTransparent = new QLabel( tr( "SMESH_TRANSPARENCY_TRANSPARENT" ), GroupC1 );
- TextLabelTransparent->setAlignment( Qt::AlignLeft );
+ TextLabelTransparent->setAlignment( Qt::AlignRight );
ValueLab = new QLabel( GroupC1 );
ValueLab->setAlignment( Qt::AlignCenter );
QFont fnt = ValueLab->font(); fnt.setBold( true ); ValueLab->setFont( fnt );
TextLabelOpaque = new QLabel( tr( "SMESH_TRANSPARENCY_OPAQUE" ), GroupC1 );
- TextLabelOpaque->setAlignment( Qt::AlignRight );
+ TextLabelOpaque->setAlignment( Qt::AlignLeft );
Slider1 = new QSlider( Qt::Horizontal, GroupC1 );
Slider1->setRange( 0, 100 );
Slider1->setFocusPolicy( Qt::NoFocus );
Slider1->setMinimumWidth( 300 );
- GroupC1Layout->addWidget( TextLabelTransparent, 0, 0 );
+ GroupC1Layout->addWidget( TextLabelOpaque, 0, 0 );
GroupC1Layout->addWidget( ValueLab, 0, 1 );
- GroupC1Layout->addWidget( TextLabelOpaque, 0, 2 );
+ GroupC1Layout->addWidget( TextLabelTransparent, 0, 2 );
GroupC1Layout->addWidget( Slider1, 1, 0, 1, 3 );
/*************************************************************************/
{
if ( myViewWindow ) {
SUIT_OverrideCursor wc;
- float opacity = Slider1->value() / 100.;
+ float opacity = ( 100 - Slider1->value() ) / 100.;
SALOME_ListIO aList;
mySelectionMgr->selectedObjects( aList );
}
else {
}
- Slider1->setValue( opacity );
+ Slider1->setValue( 100 - opacity );
}
ValueHasChanged();
}
</message>
<message>
<source>SMESH_TRANSPARENCY_OPAQUE</source>
- <translation>---> Opaque</translation>
+ <translation>Opaque</translation>
</message>
<message>
<source>SMESH_TRANSPARENCY_TITLE</source>
</message>
<message>
<source>SMESH_TRANSPARENCY_TRANSPARENT</source>
- <translation>Transparent <---</translation>
+ <translation>Transparent</translation>
</message>
<message>
<source>SMESH_TRIANGLE</source>