1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-23 11:47:24 +01:00

merge from branch v3_1

This commit is contained in:
Vadim Kurland 2010-01-18 21:38:17 +00:00
commit 1412d171a7
2 changed files with 28 additions and 2 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 2380
#define BUILD_NUM 2384

View File

@ -1209,7 +1209,7 @@ void RuleSetModel::objectChanged(FWObject* object)
QModelIndexList RuleSetModel::findObject (FWObject* object)
{
qDebug() << "uleSetModel::findObject (FWObject* object)";
// qDebug() << "RuleSetModel::findObject (FWObject* object)";
QModelIndexList list;
RuleSetModelIterator it = begin();
@ -1230,8 +1230,11 @@ QModelIndexList RuleSetModel::findObject (FWObject* object)
// qDebug() << "Rule " << rule->getPosition();
// iterate through columns
int column = 0;
foreach(ColDesc colDesc, header)
{
column++;
if (colDesc.type == ColDesc::Object || colDesc.type == ColDesc::Time)
{
// try to find the object
@ -1251,7 +1254,30 @@ QModelIndexList RuleSetModel::findObject (FWObject* object)
break;
}
}
} else if (colDesc.type == ColDesc::Action)
{
PolicyRule * pr = PolicyRule::cast(rule);
if (pr != 0)
{
if (pr->getAction() == PolicyRule::Branch)
{
if (pr->getBranch() == object)
{
list.append(this->index(rule, column));
// qDebug() << "Branch column:" << column;
}
} else if (pr->getAction() == PolicyRule::Tag)
{
if (pr->getTagObject() == object)
{
list.append(this->index(rule, column));
// qDebug() << "Tag column:" << column;
}
}
}
}
}
++it;
}