1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-18 17:27:20 +01:00

see #2609 additional checks to make sure we do not allow drag and drop between different instances of the program

This commit is contained in:
Vadim Kurland 2011-07-19 19:35:54 -07:00
parent d966ac1eb0
commit e553360d24
2 changed files with 5 additions and 0 deletions

View File

@ -535,6 +535,9 @@ void ObjectTreeView::dragMoveEvent(QDragMoveEvent *ev)
void ObjectTreeView::dropEvent(QDropEvent *ev)
{
// only accept drops from the same instance of fwbuilder
if (ev->source() == NULL) return;
ObjectTreeViewItem *dest =
dynamic_cast<ObjectTreeViewItem *>(itemAt(ev->pos()));
if (dest == 0) {

View File

@ -2111,6 +2111,8 @@ void RuleSetView::dragEnterEvent( QDragEnterEvent *ev)
void RuleSetView::dropEvent(QDropEvent *ev)
{
// only accept drops from the same instance of fwbuilder
if (ev->source() == NULL) return;
RuleSetModel* md = ((RuleSetModel*)model());
if (!canChange(md)) return;