Hi Brad,

I have amended the checks in BuildOptions.cpp, I've checked my changes
into VPB svn/trunk, could you try them out?

Thanks,
Robert.

On Fri, Jun 25, 2010 at 5:48 AM, Christiansen, Brad
<[email protected]> wrote:
> Hi,
>
> As part of my recent testing of VPB, I discovered two checks in BuildOptions 
> that prevent the addition or removal of layers or optional layers. The fix is 
> to simply remove these checks.
>
> The first check compares the number of image options in the previous version 
> of the database against the number of image options in the 'to be created' 
> database. As an ImageOptions object is created for each layer the addition of 
> a new layer or removal of an old layer will cause the check to fail which 
> prevents the update to the database:
>
> if (_imageOptions.size() != rhs._imageOptions.size()) return false;
>
> I have removed this check. It should be noted that the subsequent lines of 
> code still check that the options for any existing layers have not been 
> modified so I don't believe removing the size check will cause any issues.
>
>
> The second check I have removed compares the optional layer sets:
>
> if (_optionalLayerSet != rhs._optionalLayerSet) return false;
>
> This check prevents the addition or removal of optional layers. I have 
> removed this check. I actually submitted this fix quite some time ago but it 
> was missed. I have been creating a lot of databases over the last 5 months or 
> so without this check, adding and removing many optional layers, and have not 
> run into any issues so it appears to be safe not to have it.
>
> Cheers,
>
> Brad
>
>
>
>
>
> DISCLAIMER:---------------------------------------------------------------------------
> This e-mail transmission and any documents, files and previous e-mail messages
> attached to it are private and confidential. They may contain proprietary or 
> copyright
> material or information that is subject to legal professional privilege. They 
> are for
> the use of the intended recipient only.  Any unauthorised viewing, use, 
> disclosure,
> copying, alteration, storage or distribution of, or reliance on, this message 
> is
> strictly prohibited. No part may be reproduced, adapted or transmitted 
> without the
> written permission of the owner. If you have received this transmission in 
> error, or
> are not an authorised recipient, please immediately notify the sender by 
> return email,
> delete this message and all copies from your e-mail system, and destroy any 
> printed
> copies. Receipt by anyone other than the intended recipient should not be 
> deemed a
> waiver of any privilege or protection. Thales Australia does not warrant or 
> represent
> that this e-mail or any documents, files and previous e-mail messages 
> attached are
> error or virus free.
> --------------------------------------------------------------------------------------
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to