]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: add method clearFocusElement.
authorThomas Geymayer <tomgey@gmail.com>
Mon, 25 Aug 2014 19:49:21 +0000 (21:49 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Mon, 25 Aug 2014 19:49:21 +0000 (21:49 +0200)
simgear/canvas/Canvas.cxx
simgear/canvas/Canvas.hxx
simgear/canvas/elements/CanvasText.cxx

index 0a6b2b4834f4c52551fd63485cdb1d8390c390c4..025b6f7f4b2508cfe07431748b77f1a1ed55721c 100644 (file)
@@ -212,6 +212,12 @@ namespace canvas
     _focus_element = el;
   }
 
+  //----------------------------------------------------------------------------
+  void Canvas::clearFocusElement()
+  {
+    _focus_element.reset();
+  }
+
   //----------------------------------------------------------------------------
   void Canvas::enableRendering(bool force)
   {
index 7473139bf76cf40498e266a7e97d37b21c5b2d34..efcb0a473f38cf53b139baf488e84f2b57a274b2 100644 (file)
@@ -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
        *
index 8658a06af7aec07f8f503bef9882a176a770f502..3e34a8f695b1eb5171d02f7ad76c0c4af4c85242 100644 (file)
@@ -28,7 +28,6 @@ namespace simgear
 {
 namespace canvas
 {
-  class TextLine;
   class Text::TextOSG:
     public osgText::Text
   {