Cloning window might go wrong

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

zaexage
Just popping in
Just popping in
Posts: 15
Joined: Wed Mar 02, 2011 02:43

Cloning window might go wrong

Postby zaexage » Fri Jul 01, 2011 08:41

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.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Cloning window might go wrong

Postby Kulik » Fri Jul 01, 2011 09:13

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?

zaexage
Just popping in
Just popping in
Posts: 15
Joined: Wed Mar 02, 2011 02:43

Re: Cloning window might go wrong

Postby zaexage » Wed Jul 06, 2011 01:40

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?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Cloning window might go wrong

Postby Kulik » Wed Jul 06, 2011 09:06

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.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest