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:
parent
e2ac4479b1
commit
cbdc5e9a97
@ -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):
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user