Thomas Geymayer [Wed, 19 Mar 2014 15:31:17 +0000 (16:31 +0100)]
CanvasGroup: return empty bounding box without children.
Return an invalid bounding box can lead to problems
if used unchecked. Just returning an empty bounding
box (size 0x0 and position at the origin of the
element) is much safer.
Thomas Geymayer [Sat, 15 Mar 2014 13:39:23 +0000 (14:39 +0100)]
Canvas: fix position for drag events and multiclick handling.
- Calculate local/client position for every drag event
instead of just reporting the position of the initial
mousedown event.
- Only pressing the same button multiple times increases
the mouse clickcount.
Thomas Geymayer [Wed, 5 Mar 2014 23:29:55 +0000 (00:29 +0100)]
SGPropertyNode: do not keep list of deleted children.
Get rid of the possibilty to keep delted children. This was not
used actively, required unnecessary memory for each property node
and lead to subtile bugs, as creating a node after a node with
the same path has been deleted resulted in getting the old node
back instead of a cleanly initialized one.
James Turner [Thu, 13 Feb 2014 18:49:16 +0000 (18:49 +0000)]
Revise SGBucket::get_width_m
- remove the 0.5 degree offset away from the equator, which was
causing wrap-around at the poles
- add a new helper to get the highest latitude of a tile (which may
be +/- 90 for the polar cap tiles), and use this to compute radius
- special case the polar-caps and return a fixed, small width so
the tile-manager loads all tiles.
James Turner [Thu, 13 Feb 2014 12:36:06 +0000 (12:36 +0000)]
Revised set_bucket implementation.
- sink some inline methods into the .cxx file
- add isValid test to SGBucket
- sgGetBuckets won't return invalid buckets near the poles
- additional unit tests
Thomas Geymayer [Sat, 8 Feb 2014 18:10:26 +0000 (19:10 +0100)]
Put unused attributes in the property tree while parsing.
Store unhandled xml attributes in a subnode named _attr_ for each
node on parsing propertylist files. This allows retrieving them at
a later stage where there is no access to the source xml file any
more.
James Turner [Wed, 15 Jan 2014 21:56:16 +0000 (21:56 +0000)]
Support a 'clear' operation on SGBinding.
Needed to bug-fix a problem with the menubar on Mac - post-3.0 I will
change the behaviour of SGBinding's destructor to avoid the property
copies in other use-cases.
Thomas Geymayer [Mon, 6 Jan 2014 11:10:39 +0000 (12:10 +0100)]
Socket: do not crash on writing to broken pipe.
Writing to a closed socket on all Unix/Linux systems raises
a SIGPIPE signal which immediately closes the program. Disabling
raising of SIGPIPE allows proper error handling by checking the
return values of send/sendto and getting the EPIPE in errno.
James Turner [Mon, 6 Jan 2014 08:26:42 +0000 (08:26 +0000)]
Crash fix: use cache to find materials.
Add a thread-safe cache of the currently valid materials, to avoid
the osgDB thread making repeated SGCondition evaluations in conflict
with the main thread.
James Turner [Fri, 3 Jan 2014 19:51:58 +0000 (19:51 +0000)]
Bugs 1207, 1301
Only apply the fix for time-zone offsetting on Windows, since Unix
is handling mktime differently. (Arguably we should also apply a
conversion for Unix systems, but the previous logic worked)
James Turner [Thu, 19 Dec 2013 17:20:06 +0000 (17:20 +0000)]
Bugfix: remove SGSky minimum distance check.
Without this, various sky rendering modes exhibit artefacts in low-
visibility conditions. The cost of always rendering the dome is
negligible. (And Rembrandt already had to work this way)
Rebecca Palmer [Tue, 17 Dec 2013 17:40:33 +0000 (17:40 +0000)]
Fix buffer overflow CVE-2012-2091 (thanks to Saikrishna Arcot)
https://bugs.launchpad.net/ubuntu/+source/simgear/+bug/1077624
(discussed in comments 65-78)
(This is already fixed in 2.12 but appears to have been forgotten in 2.99;
the other vulnerabilities described there are already fixed.)
James Turner [Tue, 10 Dec 2013 17:37:37 +0000 (17:37 +0000)]
Reset: alternate property copying strategy.
Search the tree for leaves / sub-trees with a particular attribute set.
This permits both sparse selection as well as selection by sub-tree.
(This is needed for PRESERVE attribute, and once new reset is switched
on, will enable 'normal' copyProperties to revert to ignoring
attributes completely)