From c5f1ffaf644c26c7b5b0c5fa5b61cda608562201 Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 1 Feb 2006 20:54:17 +0000 Subject: [PATCH] fix 2D compass --- src/Cockpit/built_in/FGMagRibbon.cxx | 4 ++-- src/Cockpit/panel.hxx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cockpit/built_in/FGMagRibbon.cxx b/src/Cockpit/built_in/FGMagRibbon.cxx index 7f0b64342..9aa7632a3 100644 --- a/src/Cockpit/built_in/FGMagRibbon.cxx +++ b/src/Cockpit/built_in/FGMagRibbon.cxx @@ -65,8 +65,8 @@ FGMagRibbon::draw () // Adjust to put the number in the centre xoffset -= 0.25; - FGCroppedTexture t = getTexture(); - t.setCrop(xoffset, yoffset, xoffset + 0.5, yoffset + 0.25); + FGCroppedTexture *t = getTexture(); + t->setCrop(xoffset, yoffset, xoffset + 0.5, yoffset + 0.25); glPushAttrib(GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST); diff --git a/src/Cockpit/panel.hxx b/src/Cockpit/panel.hxx index f4dbd7eb2..9c110d072 100644 --- a/src/Cockpit/panel.hxx +++ b/src/Cockpit/panel.hxx @@ -491,6 +491,7 @@ public: _texture = texture; } virtual const FGCroppedTexture &getTexture () const { return _texture; } + virtual FGCroppedTexture *getTexture() { return &_texture; } private: FGCroppedTexture _texture; -- 2.39.5