Skip to content
Snippets Groups Projects
Commit ffe173bd authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

ctrl + click bug fixed. we can move selected agent

parent 9aa13034
No related branches found
No related tags found
No related merge requests found
......@@ -743,6 +743,8 @@ class EditorModel(object):
# Has the user clicked on an existing agent?
iAgent = self.find_agent_at(rcCell)
print("sel:", iAgent, self.iSelectedAgent)
if iAgent is None:
# No
if self.iSelectedAgent is None:
......@@ -754,6 +756,8 @@ class EditorModel(object):
# Move the selected agent to this cell
agent_static = self.env.agents_static[self.iSelectedAgent]
agent_static.position = rcCell
agent_static.old_position = rcCell
self.env.agents = []
else:
# Yes
# Have they clicked on the agent already selected?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment