mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-05 18:54:18 +05:00
Fix a bug from the additional comment from Ilya MATVEYEV 2008-04-28 14:32 for bug IPAL19572: the content of previously created filter is not cleaned.
This commit is contained in:
parent
fb78ee1007
commit
f8dd22cb6e
@ -582,7 +582,7 @@ void SMESHGUI_FilterTable::Table::setReadOnly( bool on )
|
||||
|
||||
bool SMESHGUI_FilterTable::Table::isReadOnly() const
|
||||
{
|
||||
return editTriggers() != QAbstractItemView::NoEditTriggers;
|
||||
return editTriggers() == QAbstractItemView::NoEditTriggers;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -733,7 +733,7 @@ void SMESHGUI_FilterTable::Init (const QList<int>& theTypes)
|
||||
|
||||
// layout widgets
|
||||
QGridLayout* aLay = new QGridLayout(myTableGrp);
|
||||
aLay->setMargin(0);
|
||||
aLay->setMargin(MARGIN);
|
||||
aLay->setSpacing(SPACING);
|
||||
|
||||
aLay->addWidget(mySwitchTableGrp, 0, 0, 7, 1);
|
||||
|
@ -225,8 +225,8 @@ QWidget* SMESHGUI_FilterLibraryDlg::createMainFrame (QWidget* theParent)
|
||||
connect(myFileName, SIGNAL(returnPressed()), this, SLOT(onReturnPressed()));
|
||||
connect(myOpenBtn, SIGNAL(clicked()), this, SLOT(onBrowse()));
|
||||
|
||||
connect(myListBox, SIGNAL( currentItemChanged( QListWidgetItem*, QListWidgetItem* ) ),
|
||||
this, SLOT( onFilterChanged( QListWidgetItem*, QListWidgetItem* ) ) );
|
||||
connect(myListBox, SIGNAL(itemSelectionChanged()),
|
||||
this, SLOT(onFilterChanged()));
|
||||
|
||||
connect(myAddBtn, SIGNAL(clicked()), this, SLOT(onAddBtnPressed()));
|
||||
connect(myDeleteBtn, SIGNAL(clicked()), this, SLOT(onDeleteBtnPressed()));
|
||||
@ -809,11 +809,11 @@ bool SMESHGUI_FilterLibraryDlg::isValid(const bool theMess) const
|
||||
|
||||
//=======================================================================
|
||||
// name : SMESHGUI_FilterLibraryDlg::onFilterChanged
|
||||
// Purpose : SLOT. Called when selected filter of library changed
|
||||
// Purpose : SLOT. Called when selected filter of library is changed
|
||||
//=======================================================================
|
||||
void SMESHGUI_FilterLibraryDlg::onFilterChanged( QListWidgetItem* item, QListWidgetItem* )
|
||||
void SMESHGUI_FilterLibraryDlg::onFilterChanged()
|
||||
{
|
||||
QString theName = item ? item->text() : QString::null;
|
||||
QString theName = myListBox->currentItem() ? myListBox->currentItem()->text() : QString::null;
|
||||
if (myLibrary->_is_nil())
|
||||
return;
|
||||
|
||||
@ -934,13 +934,13 @@ void SMESHGUI_FilterLibraryDlg::onAddBtnPressed()
|
||||
{
|
||||
if (!isValid(true))
|
||||
return;
|
||||
}
|
||||
{
|
||||
|
||||
SMESH::Filter_var aFilter = createFilter();
|
||||
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
|
||||
myName->text().toLatin1().constData(),
|
||||
aFilter);
|
||||
}
|
||||
myTable->Clear(myTable->GetType());
|
||||
|
||||
addFilterToLib(getDefaultFilterName());
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ private slots:
|
||||
|
||||
void onBrowse();
|
||||
void onReturnPressed();
|
||||
void onFilterChanged( QListWidgetItem*, QListWidgetItem* );
|
||||
void onFilterChanged();
|
||||
void onAddBtnPressed();
|
||||
void onDeleteBtnPressed();
|
||||
void onFilterNameChanged( const QString& );
|
||||
|
Loading…
Reference in New Issue
Block a user