Joacim Persson
Mon, 19 Dec 2005 05:43:16 -0800
The magnetic compass in the defailt 2d panel has been broken for some time. (worked in 0.9.8) This is the built-in magnetic compass defined in Cockpit/panel.*xx and Cockpit/built_in/FGMagRibbon.cxx I've got it back in operation, allthough I don't quite understand why. Putting back the non-const getTexture() alias in panel.hxx which wasremoved in a cleanup patch some time ago; panel.hxx line 470: virtual FGCroppedTexture &getTexture () { return _texture; }
and changing back Cockpit/built_in/FGMagRibbon.cxx, line 68, to: FGCroppedTexture &t = getTexture(); ...got the compass back alright. But the finer details of C++ storage must elude me here, because I honestly can't see what was wrong with the current code. (The current "FGCroppedTexture t = getTexture();" should yield a new perfectly writable FGCroppedTexture in "t", shouldn't it?) The texture in question is altered in the following line (setting the cropping limits) so it has to be writable. _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d