Kaydet (Commit) 3c6d932f authored tarafından Noel Grandin's avatar Noel Grandin

java: was passing the wrong thing to the remove method

on a Map, we need to pass the key, not the value, to be deleted
Found by FindBugs.

Change-Id: If6fd3d8d56a7c7dfabac31d8ee268939e582f4eb
üst 46540d08
...@@ -116,9 +116,9 @@ class Canvas ...@@ -116,9 +116,9 @@ class Canvas
int i = maNodes.indexOf (aNode); int i = maNodes.indexOf (aNode);
if( i != -1 ) if( i != -1 )
{ {
Object aObject = maObjects.get(aNode); CanvasShape aObject = maObjects.get(aNode);
maObjectList.remove (aObject); maObjectList.remove (aObject);
maObjects.remove (aObject); maObjects.remove (aNode);
maNodes.remove (aNode); maNodes.remove (aNode);
repaint (); repaint ();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment