When you clone a window, all of the properties from the source window are cloned to the new window.
This includes intrinsic properties as defined in Element::addElementProperties().
Amongst these is "Rotation".
However, when the rotation is set this results in Window::onRotated being called, and this in turn turns on autorender surface support, even though the rotation is identity rotation.
The end result of this is that all cloned elements (and their children if you want a deep clone) gets autorender surface support. Which you don't want.
So, there are a couple of different solutions to this:
* alter Window::onRotated to only turn on autorender surface support if rotation is other than identity
* alter Element::setRotation to only call into onRotated if the new rotation differs from the existing rotation
* alter Window::clonePropertiesTo to only call target.setProperty if the property is different
The first two are easiest, but I'm thinking that this might affect other intrinsic properties than Render, which makes the last approach perhaps the most solid.
Thoughts?
[Solved] Cloning windows sets rotation
Moderators: CEGUI MVP, CEGUI Team
- ErikHjortsberg
- Not too shy to talk
- Posts: 26
- Joined: Sun Jan 23, 2005 12:45
- Location: Sweden
- Contact:
[Solved] Cloning windows sets rotation
Ember, a client for the Worldforge system.
Re: Cloning windows sets rotation
We will probably use the first for v0-8
We should probably fix this soon and we need a good solution for default branch as well.
Code: Select all
[14:00:45] mpreisler Ident: I think the first solution is the cleanest and least intrusive for the v0-8 branch
[14:01:16] mpreisler with numeric_limits we should be able to figure out a good range test for the quaternion
[14:01:26] mpreisler we will of course never turn ARS off
We should probably fix this soon and we need a good solution for default branch as well.
CrazyEddie: "I don't like GUIs"
Re: Cloning windows sets rotation
Fixed with https://bitbucket.org/cegui/cegui/commi ... 78d56a956b
Testing from within CEED but would appreciate a confirmation that this issue is fixed for your use-case.
Testing from within CEED but would appreciate a confirmation that this issue is fixed for your use-case.
- ErikHjortsberg
- Not too shy to talk
- Posts: 26
- Joined: Sun Jan 23, 2005 12:45
- Location: Sweden
- Contact:
Re: Cloning windows sets rotation
Yep, this fixes the issue. Thanks!
Ember, a client for the Worldforge system.
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 2 guests