Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix arbitrary content being dragged and dropped causing errors #2631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gui/builtinAdditionPanes/boosterView.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data
data = dragged_data.split(':')

if dragged_data is None:
return t

self.dropFn(x, y, data)
return t

Expand Down
4 changes: 4 additions & 0 deletions gui/builtinAdditionPanes/cargoView.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def __init__(self, dropFn, *args, **kwargs):
def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data

if dragged_data is None:
return t

data = dragged_data.split(':')
self.dropFn(x, y, data)
return t
Expand Down
4 changes: 4 additions & 0 deletions gui/builtinAdditionPanes/commandView.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def __init__(self, dropFn, *args, **kwargs):
def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data

if dragged_data is None:
return t

data = dragged_data.split(':')
self.dropFn(x, y, data)
return t
Expand Down
4 changes: 4 additions & 0 deletions gui/builtinAdditionPanes/droneView.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def __init__(self, dropFn, *args, **kwargs):
def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data

if dragged_data is None:
return t

data = dragged_data.split(':')
self.dropFn(x, y, data)
return t
Expand Down
4 changes: 4 additions & 0 deletions gui/builtinAdditionPanes/fighterView.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def __init__(self, dropFn, *args, **kwargs):
def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data

if dragged_data is None:
return t

data = dragged_data.split(':')
self.dropFn(x, y, data)
return t
Expand Down
4 changes: 4 additions & 0 deletions gui/builtinAdditionPanes/implantView.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def __init__(self, dropFn, *args, **kwargs):
def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data

if dragged_data is None:
return t

data = dragged_data.split(':')
self.dropFn(x, y, data)
return t
Expand Down
4 changes: 4 additions & 0 deletions gui/builtinAdditionPanes/projectedView.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def __init__(self, dropFn, *args, **kwargs):
def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data

if dragged_data is None:
return t

data = dragged_data.split(':')
self.dropFn(x, y, data)
return t
Expand Down
4 changes: 4 additions & 0 deletions gui/builtinViews/fittingView.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ def OnData(self, x, y, t):
if self.GetData():
dragged_data = DragDropHelper.data
# pyfalog.debug("fittingView: recieved drag: " + self.dropData.GetText())

if dragged_data is None:
return t

data = dragged_data.split(':')
self.dropFn(x, y, data)
return t
Expand Down