Page 1 of 1

Cloning window might go wrong

Posted: Fri Jul 01, 2011 08:41
by zaexage
I use the Window::clone to clone new window, but some properties in new window are not correct.

It seems that clone() will clone un-banned properties from src to dst window, including `LookNFeel' property.
And, it seems that Cloning `LookNFeel' may cause some properties to be overwritten again.

our solution is to ban the property `LookNFeel' in Window::addStandardProperties(). Well, it might not be a nice solution.

Re: Cloning window might go wrong

Posted: Fri Jul 01, 2011 09:13
by Kulik
Yeah I guess you are right. I think the best might be to copy LookNFeel over first, then copy the rest. That should work. Could you confirm my theory?

Re: Cloning window might go wrong

Posted: Wed Jul 06, 2011 01:40
by zaexage
Is it necessary to set the property and incur setLookNFeel again?

How about we just ban the `looknfeel', and assign the d_lookName from src to dst window at the end of clone()?
Will it bring up any problem?

Re: Cloning window might go wrong

Posted: Wed Jul 06, 2011 09:06
by Kulik
I think the problem might be that looknfeel sets it's own property defaults and we want to ensure they are correct. Truth is that they should already be set in the originating window but to be sure I would prefer to set the looknfeel, then set everything but looknfeel. That should IMO ensure this.

A mantis ticket should probably be created for this.