amitsarangi / mt4j

Automatically exported from code.google.com/p/mt4j
GNU General Public License v2.0
0 stars 0 forks source link

Destroying a cell from an MTList doesn't make the rest align to the top #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create and MTList, add some MTListCell's
2. Remove a cell somewhere with cell.destroy

What is the expected output? What do you see instead?

You see that the cell is removed from it's parent, but the other cells are not 
aligned right. We do not get the same output as when we use 
list.removeElement(cell). cell.destroy should call it's parent list 
removeElement so the output is the same.

What version of the product are you using? On what operating system?

Latest svn. Mac OS X 10.6.7. Latest Java version

Original issue reported on code.google.com by michael....@gmail.com on 25 Mar 2011 at 10:40

GoogleCodeExporter commented 9 years ago
while the preferred way to remove a list element from a list is the 
removeListElement() method, I agree that it would would be useful to 
automatically remove the element from a list if it is destroyed

so this should work now

Original comment by sirhc.f...@gmail.com on 28 Mar 2011 at 12:16

GoogleCodeExporter commented 9 years ago
You're right about that. But currently calling destroy always removes the 
component from it's parent. That's ok, but it's even better when it does that 
decently and calls a removeElement on the parent list in case you called 
destroy on a cell.

Thanks for changing this!

Original comment by michael....@gmail.com on 28 Mar 2011 at 12:27