1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 03:07:20 +01:00

fixed #1785 Deleting graphic icon of object from Find tab should also remove the text name or label

This commit is contained in:
Vadim Kurland 2010-10-05 01:11:35 +00:00
parent 9a097d18c9
commit d079f0f445
4 changed files with 22 additions and 3 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 3317
#define BUILD_NUM 3318

View File

@ -1,5 +1,9 @@
2010-10-04 Vadim Kurland <vadim@vk.crocodile.org>
* FindObjectWidget.cpp (objectDeleted): fixed #1785 "Deleting
graphic icon of object from Find tab should also remove the text
name or label"
* newFirewallDialog.cpp (changed): fixed #1770 Eliminated pause
that happened when user switched from page 0 to page 1 of the new
firewall wizard. Pause was caused by the DNS queries the program

View File

@ -92,6 +92,9 @@ FindObjectWidget::FindObjectWidget(QWidget*p, ProjectPanel *pp,
tr("Drop object you want to find here"));
m_widget->replaceDropArea->setHelperText(
tr("Drop object for replacement here"));
connect(m_widget->findDropArea, SIGNAL(objectDeleted()),
this, SLOT(objectDeleted()));
}
void FindObjectWidget::keyPressEvent( QKeyEvent* ev )
@ -111,10 +114,8 @@ void FindObjectWidget::findObject(FWObject *o)
if (fwbdebug) qDebug("FindObjectWidget::findObject");
show();
m_widget->findDropArea->insertObject(o);
}
void FindObjectWidget::enableAll()
{
m_widget->useRegexp->setEnabled (true);
@ -157,6 +158,17 @@ void FindObjectWidget::reset()
found_objects.clear();
}
/**
* This slot is called when user deletes an object from the "find"
* drop area. See #1785
*/
void FindObjectWidget::objectDeleted()
{
m_widget->findAttr->blockSignals(true);
m_widget->findAttr->lineEdit()->setText("");
m_widget->findAttr->blockSignals(false);
}
/**
* This slot is called when @attribute or @findAttr fields change
* (that is, whenever user changes attribute they want to match or type
@ -166,7 +178,9 @@ void FindObjectWidget::findAttrChanged(const QString &ns)
{
if (ns!=lastAttrSearch) reset();
lastAttrSearch = ns;
m_widget->findDropArea->blockSignals(true);
m_widget->findDropArea->deleteObject(); // for #1757
m_widget->findDropArea->blockSignals(false);
}
void FindObjectWidget::find()

View File

@ -91,6 +91,7 @@ public slots:
void init();
void firewallOpened(libfwbuilder::Firewall *f);
void scopeChanged();
void objectDeleted();
signals:
void close();