diff --git a/build_num b/build_num index 02f77b2d0..4509f2710 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 2939 +#define BUILD_NUM 2940 diff --git a/doc/ChangeLog b/doc/ChangeLog index 06614236c..08efc85a9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2010-05-31 vadim + + * FirewallDialog.cpp (FirewallDialog::fillVersion): fixed #1481 + when user changes platform in the firewall object, its version + should change too. + 2010-05-28 vadim * ObjectManipulator.cpp (ObjectManipulator::editSelectedObject): diff --git a/src/gui/FirewallDialog.cpp b/src/gui/FirewallDialog.cpp index 6ec33d95b..89d3f656d 100644 --- a/src/gui/FirewallDialog.cpp +++ b/src/gui/FirewallDialog.cpp @@ -175,6 +175,7 @@ void FirewallDialog::fillVersion() list vl; getVersionsForPlatform(readPlatform(m_dialog->platform), vl); QString v = obj->getStr("version").c_str(); + bool found_version = false; int cp = 0; for (list::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(); } }