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:
parent
d966ac1eb0
commit
e553360d24
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user