From: Thomas Geymayer Date: Mon, 25 Aug 2014 19:49:21 +0000 (+0200) Subject: Canvas: add method clearFocusElement. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4f94c22241e5ef90026fd087168b24a13ee5ef9b;p=simgear.git Canvas: add method clearFocusElement. --- diff --git a/simgear/canvas/Canvas.cxx b/simgear/canvas/Canvas.cxx index 0a6b2b48..025b6f7f 100644 --- a/simgear/canvas/Canvas.cxx +++ b/simgear/canvas/Canvas.cxx @@ -212,6 +212,12 @@ namespace canvas _focus_element = el; } + //---------------------------------------------------------------------------- + void Canvas::clearFocusElement() + { + _focus_element.reset(); + } + //---------------------------------------------------------------------------- void Canvas::enableRendering(bool force) { diff --git a/simgear/canvas/Canvas.hxx b/simgear/canvas/Canvas.hxx index 7473139b..efcb0a47 100644 --- a/simgear/canvas/Canvas.hxx +++ b/simgear/canvas/Canvas.hxx @@ -145,6 +145,13 @@ namespace canvas */ void setFocusElement(const ElementPtr& el); + /** + * Clear the focus element. + * + * @see setFocusElement() + */ + void clearFocusElement(); + /** * Enable rendering for the next frame * diff --git a/simgear/canvas/elements/CanvasText.cxx b/simgear/canvas/elements/CanvasText.cxx index 8658a06a..3e34a8f6 100644 --- a/simgear/canvas/elements/CanvasText.cxx +++ b/simgear/canvas/elements/CanvasText.cxx @@ -28,7 +28,6 @@ namespace simgear { namespace canvas { - class TextLine; class Text::TextOSG: public osgText::Text {