mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 16:39:48 +02:00
fixed #1757 Allow searching by attributes even after an object
is dropped into the drop area in search panel.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2010-09-30 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* FindObjectWidget.cpp (objectInserted): fixed #1757 Allow
|
||||
searching by attributes even after an object is dropped into the
|
||||
drop area in search panel.
|
||||
|
||||
* newFirewallDialog.cpp (browseTemplate): fixed #1759 "Use default
|
||||
template library" button seems to do nothing. This button should
|
||||
only be enabled if user switched to their own library of template
|
||||
|
||||
@@ -118,18 +118,23 @@ void FindObjectWidget::disableAll()
|
||||
|
||||
void FindObjectWidget::objectInserted()
|
||||
{
|
||||
FWObject *o=m_widget->findDropArea->getObject();
|
||||
if (o==NULL) return;
|
||||
disableAll();
|
||||
FWObject *o = m_widget->findDropArea->getObject();
|
||||
if (o == NULL) return;
|
||||
|
||||
QString n=QString::fromUtf8(o->getName().c_str());
|
||||
// disableAll(); // see #1757
|
||||
|
||||
QString n = QString::fromUtf8(o->getName().c_str());
|
||||
|
||||
m_widget->findAttr->blockSignals(true);
|
||||
|
||||
if (m_widget->findAttr->count()>=MAX_SEARCH_ITEMS_COUNT)
|
||||
m_widget->findAttr->removeItem(MAX_SEARCH_ITEMS_COUNT-1);
|
||||
|
||||
m_widget->findAttr->lineEdit()->setText (n);
|
||||
m_widget->findAttr->lineEdit()->setText(n);
|
||||
|
||||
reset();
|
||||
m_widget->findAttr->blockSignals(false);
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
void FindObjectWidget::reset()
|
||||
@@ -139,11 +144,16 @@ void FindObjectWidget::reset()
|
||||
found_objects.clear();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This slot is called when @attribute or @findAttr fields change
|
||||
* (that is, whenever user changes attribute they want to match or type
|
||||
* in the input field to change the value)
|
||||
*/
|
||||
void FindObjectWidget::findAttrChanged(const QString &ns)
|
||||
{
|
||||
if (ns!=lastAttrSearch) reset();
|
||||
lastAttrSearch=ns;
|
||||
lastAttrSearch = ns;
|
||||
m_widget->findDropArea->deleteObject(); // for #1757
|
||||
}
|
||||
|
||||
void FindObjectWidget::find()
|
||||
|
||||
@@ -282,6 +282,13 @@
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>
|
||||
fixed #1757 Allow searching by attributes even after an object
|
||||
is dropped into the drop area in search panel.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user