mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 16:39:48 +02:00
fixed #1755 "hitting enter after editing search attribute in the
Find panel should trigger search"
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2010-09-30 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* FindObjectWidget.cpp (keyPressEvent): fixed #1755 "hitting enter
|
||||
after editing search attribute in the Find panel should trigger
|
||||
search"
|
||||
|
||||
* FindObjectWidget.cpp (matchAttr): fixed #1760 'Search by
|
||||
attribute "name" should search by name or label'.
|
||||
|
||||
|
||||
@@ -94,6 +94,18 @@ FindObjectWidget::FindObjectWidget(QWidget*p, ProjectPanel *pp,
|
||||
tr("Drop object for replacement here"));
|
||||
}
|
||||
|
||||
void FindObjectWidget::keyPressEvent( QKeyEvent* ev )
|
||||
{
|
||||
if (ev->key()==Qt::Key_Enter || ev->key()==Qt::Key_Return)
|
||||
{
|
||||
if (fwbdebug)
|
||||
qDebug() << "FindObjectWidget::keyPressEvent Qt::Key_Enter";
|
||||
ev->accept();
|
||||
find();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void FindObjectWidget::findObject(FWObject *o)
|
||||
{
|
||||
if (fwbdebug) qDebug("FindObjectWidget::findObject");
|
||||
|
||||
@@ -61,6 +61,8 @@ private:
|
||||
bool matchAttr(libfwbuilder::FWObject* obj);
|
||||
bool validateReplaceObject();
|
||||
bool inSelectedFirewall( libfwbuilder::RuleElement* r);
|
||||
|
||||
virtual void keyPressEvent( QKeyEvent* ev );
|
||||
|
||||
public:
|
||||
Ui::findObjectWidget_q *m_widget;
|
||||
|
||||
@@ -640,6 +640,8 @@ void ObjectTreeView::keyPressEvent( QKeyEvent* ev )
|
||||
{
|
||||
if (ev->key()==Qt::Key_Enter || ev->key()==Qt::Key_Return)
|
||||
{
|
||||
if (fwbdebug)
|
||||
qDebug() << "ObjectTreeView::keyPressEvent Qt::Key_Enter";
|
||||
editCurrentObject();
|
||||
ev->accept();
|
||||
return;
|
||||
|
||||
@@ -201,6 +201,9 @@
|
||||
<property name="text">
|
||||
<string>Find Next</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
||||
@@ -299,6 +299,14 @@
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>
|
||||
fixed #1755 "hitting enter after editing search attribute in the
|
||||
Find panel should trigger search"
|
||||
</p>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user