mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-24 12:17:26 +01:00
fixes #2648 "right mouse click on firewall object in "Deleted objects"
library causes GUI crash"
This commit is contained in:
parent
25efaa6a91
commit
baf9e7a956
@ -1,5 +1,9 @@
|
||||
2011-08-25 Vadim Kurland <vadim@netcitadel.com>
|
||||
|
||||
* ObjectManipulator.cpp (openLibForObject): fixes #2648 "right
|
||||
mouse click on firewall object in "Deleted objects" library causes
|
||||
GUI crash"
|
||||
|
||||
* PolicyCompiler_ipt.cpp (processNext): fixes #2650 "rules with
|
||||
address range that includes firewall address in Src are placed in
|
||||
OUTPUT chain even though addresses that do not match the firewall
|
||||
|
||||
@ -415,6 +415,8 @@ void ObjectManipulator::contextMenuRequested(const QPoint &pos)
|
||||
/* in extended selection mode there may be several selected items */
|
||||
|
||||
ObjectTreeView *objTreeView = getCurrentObjectTree();
|
||||
if (objTreeView == NULL) return;
|
||||
|
||||
QTreeWidgetItem *item = objTreeView->itemAt(pos);//clicked item
|
||||
|
||||
if (fwbdebug)
|
||||
@ -1213,7 +1215,9 @@ void ObjectManipulator::editSelectedObject()
|
||||
{
|
||||
if (fwbdebug) qDebug("ObjectManipulator::editSelectedObject");
|
||||
|
||||
if (getCurrentObjectTree()->getNumSelected()==0) return;
|
||||
ObjectTreeView *objTreeView = getCurrentObjectTree();
|
||||
if (objTreeView == NULL) return;
|
||||
if (objTreeView->getNumSelected()==0) return;
|
||||
|
||||
FWObject *obj = getCurrentObjectTree()->getSelectedObjects().front();
|
||||
if (obj==NULL) return;
|
||||
@ -1415,6 +1419,14 @@ void ObjectManipulator::openLibForObject(FWObject *obj)
|
||||
{
|
||||
FWObject *parent = obj->getParent();
|
||||
FWObject *lib = parent->getLibrary();
|
||||
// see #2648 if a library was deleted with all of its
|
||||
// contents, then it is possible that variable lib may point
|
||||
// to such deleted library, which is located inside of the
|
||||
// "Deleted Objects" library.
|
||||
if (lib->getParent()->getId() == FWObjectDatabase::DELETED_OBJECTS_ID)
|
||||
lib = m_project->db()->findInIndex(
|
||||
FWObjectDatabase::DELETED_OBJECTS_ID);
|
||||
|
||||
m_objectManipulator->libs->setCurrentIndex(
|
||||
libs_model->getIdxForLib(lib).row());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user