1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 11:17:31 +01:00

* FirewallDialog.cpp (FirewallDialog::fillVersion): fixed #1481

when user changes platform in the firewall object, its version
should change too.
This commit is contained in:
Vadim Kurland 2010-05-31 16:25:35 +00:00
parent e2ac4479b1
commit cbdc5e9a97
3 changed files with 16 additions and 2 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 2939
#define BUILD_NUM 2940

View File

@ -1,3 +1,9 @@
2010-05-31 vadim <vadim@vk.crocodile.org>
* FirewallDialog.cpp (FirewallDialog::fillVersion): fixed #1481
when user changes platform in the firewall object, its version
should change too.
2010-05-28 vadim <vadim@vk.crocodile.org>
* ObjectManipulator.cpp (ObjectManipulator::editSelectedObject):

View File

@ -175,6 +175,7 @@ void FirewallDialog::fillVersion()
list<QStringPair> vl;
getVersionsForPlatform(readPlatform(m_dialog->platform), vl);
QString v = obj->getStr("version").c_str();
bool found_version = false;
int cp = 0;
for (list<QStringPair>::iterator i1=vl.begin(); i1!=vl.end(); i1++,cp++)
{
@ -182,7 +183,14 @@ void FirewallDialog::fillVersion()
qDebug() << "Adding version " << i1->second;
m_dialog->version->addItem( i1->second );
if ( v == i1->first ) m_dialog->version->setCurrentIndex( cp );
if ( v == i1->first ) { found_version = true; m_dialog->version->setCurrentIndex( cp ); }
}
if (!found_version)
{
// version configured in the object does not match any valid
// version for this platform.
obj->setStr("version", vl.front().first.toStdString());
fillVersion();
}
}