1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-06-24 01:49:36 +02:00

fixes #2643 "GUI crashes when user cuts a rule, then right-mouse click

in any rule element of another"
This commit is contained in:
Vadim Kurland
2011-08-14 18:56:50 -07:00
parent 7a614b0908
commit 23f488361c
7 changed files with 26 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ FWB_MICRO_VERSION=1
# build number is like "nano" version number. I am incrementing build
# number during development cycle
#
BUILD_NUM="3574"
BUILD_NUM="3575"
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"

View File

@@ -1,2 +1,2 @@
#define VERSION "5.0.1.3574"
#define VERSION "5.0.1.3575"
#define GENERATION "5.0"

View File

@@ -1,3 +1,9 @@
2011-08-14 Vadim Kurland <vadim@netcitadel.com>
* RuleSetView.cpp (RuleSetView::addColumnRelatedMenu): fixes #2643
"GUI crashes when user cuts a rule, then right-mouse click in any
rule element of another"
2011-08-11 Vadim Kurland <vadim@netcitadel.com>
* freebsd/carp_interface: see #2638 "When CARP password is empty

View File

@@ -3,7 +3,7 @@
%define name fwbuilder
%define version 5.0.1.3574
%define version 5.0.1.3575
%define release 1
%if "%_vendor" == "MandrakeSoft"

View File

@@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
Priority: extra
Section: checkinstall
Maintainer: vadim@fwbuilder.org
Version: 5.0.1.3574-1
Version: 5.0.1.3575-1
Depends: libqt4-gui (>= 4.4.0), libqt4-network (>= 4.4.0), libxml2, libxslt1.1, libsnmp | libsnmp15
Description: Firewall Builder GUI and policy compilers

View File

@@ -1,6 +1,6 @@
%define name fwbuilder
%define version 5.0.1.3574
%define version 5.0.1.3575
%define release 1
%if "%_vendor" == "MandrakeSoft"

View File

@@ -766,12 +766,23 @@ void RuleSetView::addColumnRelatedMenu(QMenu *menu, const QModelIndex &index,
delID->setEnabled(!re->isAny());
// see #1976 do not allow pasting object that has been deleted
// also disable "Paste" if object in the clipboard is a rule
FWObject *obj_in_clipboard =
FWObjectClipboard::obj_clipboard->getObject();
bool obj_deleted = (obj_in_clipboard &&
obj_in_clipboard->getLibrary()->getId() ==
FWObjectDatabase::DELETED_OBJECTS_ID);
pasteID->setEnabled(obj_in_clipboard!=NULL && !obj_deleted);
pasteID->setEnabled(true);
if (obj_in_clipboard == NULL) pasteID->setEnabled(false);
else
{
if (Rule::cast(obj_in_clipboard) != NULL)
pasteID->setEnabled(false);
FWObject *lib = obj_in_clipboard->getLibrary();
if (lib != NULL && lib->getId() == FWObjectDatabase::DELETED_OBJECTS_ID)
pasteID->setEnabled(false);
}
string cap_name;
if (Policy::cast(md->getRuleSet())!=NULL) cap_name="negation_in_policy";