diff --git a/README.md b/README.md index 6568b9cb3..2b79b1f2d 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ For some displays, the [documentation is updated](docs/FEATURES.md). | Illuminance | 2D Nav Goal | Top Down Orthographic | Views | | Image | Publish Point | | Laser Scan | Initial Pose | -| Map | -| Marker | +| Map | Interact | +| Marker | | Marker Array | | Odometry | | Point Cloud (1 and 2) | @@ -43,7 +43,7 @@ These features have not been ported to `ros2/rviz` yet. | Displays | Tools | Panels | | -------------------- | ------------ | ------ | -| Axes | Interact | Time | +| Axes | | Time | | DepthCloud | | Effort | | Interactive Marker | diff --git a/rviz/src/rviz/default_plugin/tools/interaction_tool.cpp b/rviz/src/rviz/default_plugin/tools/interaction_tool.cpp deleted file mode 100644 index a88641fa5..000000000 --- a/rviz/src/rviz/default_plugin/tools/interaction_tool.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2008, Willow Garage, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include - -#include "rviz/render_panel.h" -#include "rviz/selection/selection_handler.h" -#include "rviz/selection/selection_manager.h" -#include "rviz/view_controller.h" -#include "rviz/viewport_mouse_event.h" -#include "rviz/viewport_mouse_event.h" -#include "rviz/visualization_manager.h" -#include "rviz/load_resource.h" -#include "rviz/properties/bool_property.h" - -#include "rviz/default_plugin/tools/interaction_tool.h" - -namespace rviz -{ - -InteractionTool::InteractionTool() -{ - shortcut_key_ = 'i'; - hide_inactive_property_ = new BoolProperty("Hide Inactive Objects", true, - "While holding down a mouse button, hide all other Interactive Objects.", - getPropertyContainer(), SLOT( hideInactivePropertyChanged() ), this ); -} - -InteractionTool::~InteractionTool() -{ -} - -void InteractionTool::onInitialize() -{ - move_tool_.initialize( context_ ); - last_selection_frame_count_ = context_->getFrameCount(); - deactivate(); -} - -void InteractionTool::activate() -{ - context_->getSelectionManager()->enableInteraction(true); - context_->getSelectionManager()->setTextureSize(1); -} - -void InteractionTool::deactivate() -{ - context_->getSelectionManager()->enableInteraction(false); -} - -void InteractionTool::updateFocus( const ViewportMouseEvent& event ) -{ - M_Picked results; - // Pick exactly 1 pixel - context_->getSelectionManager()->pick( event.viewport, - event.x, event.y, - event.x + 1, event.y + 1, - results, true ); - - last_selection_frame_count_ = context_->getFrameCount(); - - InteractiveObjectPtr new_focused_object; - - // look for a valid handle in the result. - M_Picked::iterator result_it = results.begin(); - if( result_it != results.end() ) - { - Picked pick = result_it->second; - SelectionHandler* handler = context_->getSelectionManager()->getHandler( pick.handle ); - if ( pick.pixel_count > 0 && handler ) - { - InteractiveObjectPtr object = handler->getInteractiveObject().lock(); - if( object && object->isInteractive() ) - { - new_focused_object = object; - } - } - } - - // If the mouse has gone from one object to another, defocus the old - // and focus the new. - InteractiveObjectPtr new_obj = new_focused_object; - InteractiveObjectPtr old_obj = focused_object_.lock(); - if( new_obj != old_obj ) - { - // Only copy the event contents here, once we know we need to use - // a modified version of it. - ViewportMouseEvent event_copy = event; - if( old_obj ) - { - event_copy.type = QEvent::FocusOut; - old_obj->handleMouseEvent( event_copy ); - } - - if( new_obj ) - { - event_copy.type = QEvent::FocusIn; - new_obj->handleMouseEvent( event_copy ); - } - } - - focused_object_ = new_focused_object; -} - -int InteractionTool::processMouseEvent( ViewportMouseEvent& event ) -{ - int flags = 0; - - if ( event.panel->contextMenuVisible() ) - { - return flags; - } - - // make sure we let the vis. manager render at least one frame between selection updates - bool need_selection_update = context_->getFrameCount() > last_selection_frame_count_; - - // We are dragging if a button was down and is still down - Qt::MouseButtons buttons = event.buttons_down & ( Qt::LeftButton | Qt::RightButton | Qt::MidButton ); - if ( event.type == QEvent::MouseButtonPress ) - buttons &= ~event.acting_button; - bool dragging = buttons != 0; - - // unless we're dragging, check if there's a new object under the mouse - if( need_selection_update && - !dragging && - event.type != QEvent::MouseButtonRelease ) - { - updateFocus( event ); - flags = Render; - } - - { - InteractiveObjectPtr focused_object = focused_object_.lock(); - if( focused_object ) - { - focused_object->handleMouseEvent( event ); - setCursor( focused_object->getCursor() ); - // this will disable everything but the current interactive object - if ( hide_inactive_property_->getBool() ) - { - context_->getSelectionManager()->enableInteraction(!dragging); - } - } - else if( event.panel->getViewController() ) - { - move_tool_.processMouseEvent( event ); - setCursor( move_tool_.getCursor() ); - if ( hide_inactive_property_->getBool() ) - { - context_->getSelectionManager()->enableInteraction(true); - } - } - } - - if( event.type == QEvent::MouseButtonRelease ) - { - updateFocus( event ); - } - - return flags; -} - -int InteractionTool::processKeyEvent( QKeyEvent* event, RenderPanel* panel ) -{ - return move_tool_.processKeyEvent( event, panel ); -} - -} // end namespace rviz - -#include -PLUGINLIB_EXPORT_CLASS( rviz::InteractionTool, rviz::Tool ) diff --git a/rviz/src/rviz/default_plugin/tools/interaction_tool.h b/rviz/src/rviz/default_plugin/tools/interaction_tool.h deleted file mode 100644 index 2ce8d69d5..000000000 --- a/rviz/src/rviz/default_plugin/tools/interaction_tool.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2008, Willow Garage, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef RVIZ_INTERACTION_TOOL_H -#define RVIZ_INTERACTION_TOOL_H - -#include - -#include - -#include - -#include "move_tool.h" - -namespace rviz -{ - -class BoolProperty; - -class InteractionTool : public Tool -{ -Q_OBJECT -public: - InteractionTool(); - virtual ~InteractionTool(); - - virtual void onInitialize(); - - virtual void activate(); - virtual void deactivate(); - - virtual int processMouseEvent( ViewportMouseEvent& event ); - virtual int processKeyEvent( QKeyEvent* event, RenderPanel* panel ); - -public Q_SLOTS: - - void hideInactivePropertyChanged() {}; - -protected: - - - /** @brief Check if the mouse has moved from one object to another, - * and update focused_object_ if so. */ - void updateFocus( const ViewportMouseEvent& event ); - - /** @brief The object (control) which currently has the mouse focus. */ - InteractiveObjectWPtr focused_object_; - - uint64_t last_selection_frame_count_; - - MoveTool move_tool_; - - BoolProperty *hide_inactive_property_; -}; - -} - -#endif - - diff --git a/rviz_common/default.rviz b/rviz_common/default.rviz index afd2d76a3..cc936fbd4 100644 --- a/rviz_common/default.rviz +++ b/rviz_common/default.rviz @@ -54,9 +54,8 @@ Visualization Manager: Fixed Frame: /map Name: root Tools: - # TODO(wjwwood): restore these tools when ported - # - Class: rviz/Interact - # Hide Inactive Objects: true + - Class: rviz_default_plugins/Interact + Hide Inactive Objects: true - Class: rviz_default_plugins/MoveCamera - Class: rviz_default_plugins/Select - Class: rviz_default_plugins/FocusCamera diff --git a/rviz_common/include/rviz_common/render_panel.hpp b/rviz_common/include/rviz_common/render_panel.hpp index 56108d26d..bfa1c6d70 100644 --- a/rviz_common/include/rviz_common/render_panel.hpp +++ b/rviz_common/include/rviz_common/render_panel.hpp @@ -104,8 +104,6 @@ class RVIZ_COMMON_PUBLIC RenderPanel : public QWidget static const Ogre::Vector3 default_camera_pose_; -// TODO(wjwwood): reenable these and pass down to rviz_rendering::RenderWindow -#if 0 /// Show the given menu as a context menu, positioned based on the current mouse position. /** * This can be called from any thread. @@ -114,7 +112,6 @@ class RVIZ_COMMON_PUBLIC RenderPanel : public QWidget /// Return true if the context menu for this panel is visible. bool contextMenuVisible(); -#endif // TODO(wjwwood): this should be moved into rviz_rendering::RenderWindowImpl, I think // virtual void sceneManagerDestroyed(Ogre::SceneManager * source); @@ -177,7 +174,7 @@ class RVIZ_COMMON_PUBLIC RenderPanel : public QWidget private Q_SLOTS: void sendMouseMoveEvent(); - // void onContextMenuHide(); + void onContextMenuHide(); private: QTimer * fake_mouse_move_event_timer_; diff --git a/rviz_common/src/rviz_common/render_panel.cpp b/rviz_common/src/rviz_common/render_panel.cpp index fc8ab5d31..00d61b8a2 100644 --- a/rviz_common/src/rviz_common/render_panel.cpp +++ b/rviz_common/src/rviz_common/render_panel.cpp @@ -296,7 +296,6 @@ void RenderPanel::resizeEvent(QResizeEvent * event) const Ogre::Vector3 RenderPanel::default_camera_pose_ = Ogre::Vector3(999999, 999999, 999999); -#if 0 void RenderPanel::showContextMenu(std::shared_ptr menu) { std::lock_guard lock(context_menu_mutex_); @@ -315,7 +314,6 @@ bool RenderPanel::contextMenuVisible() { return context_menu_visible_; } -#endif void RenderPanel::contextMenuEvent(QContextMenuEvent * event) { diff --git a/rviz_default_plugins/CMakeLists.txt b/rviz_default_plugins/CMakeLists.txt index 4be2c3201..6a3d9c763 100644 --- a/rviz_default_plugins/CMakeLists.txt +++ b/rviz_default_plugins/CMakeLists.txt @@ -116,6 +116,7 @@ set(rviz_default_plugins_headers_to_moc include/rviz_default_plugins/robot/robot_element_base_class.hpp include/rviz_default_plugins/tools/measure/measure_tool.hpp include/rviz_default_plugins/tools/nav_goal/goal_tool.hpp + include/rviz_default_plugins/tools/interaction/interaction_tool.hpp include/rviz_default_plugins/tools/pose/pose_tool.hpp include/rviz_default_plugins/tools/pose_estimate/initial_pose_tool.hpp include/rviz_default_plugins/tools/point/point_tool.hpp @@ -186,6 +187,7 @@ set(rviz_default_plugins_source_files src/rviz_default_plugins/robot/robot_link.cpp src/rviz_default_plugins/robot/robot_element_base_class.cpp src/rviz_default_plugins/robot/tf_link_updater.cpp + src/rviz_default_plugins/tools/interaction/interaction_tool.cpp src/rviz_default_plugins/tools/measure/measure_tool.cpp src/rviz_default_plugins/tools/focus/focus_tool.cpp src/rviz_default_plugins/tools/move/move_tool.cpp diff --git a/rviz_default_plugins/include/rviz_default_plugins/tools/interaction/interaction_tool.hpp b/rviz_default_plugins/include/rviz_default_plugins/tools/interaction/interaction_tool.hpp new file mode 100644 index 000000000..a74b59163 --- /dev/null +++ b/rviz_default_plugins/include/rviz_default_plugins/tools/interaction/interaction_tool.hpp @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2008, Willow Garage, Inc. + * Copyright (c) 2019, Open Source Robotics Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef RVIZ_DEFAULT_PLUGINS__TOOLS__INTERACTION__INTERACTION_TOOL_HPP_ +#define RVIZ_DEFAULT_PLUGINS__TOOLS__INTERACTION__INTERACTION_TOOL_HPP_ + +#include +#include + +#include "rviz_common/interactive_object.hpp" +#include "rviz_common/tool.hpp" + +#include "rviz_default_plugins/tools/move/move_tool.hpp" +#include "rviz_default_plugins/visibility_control.hpp" + +namespace rviz_common +{ +class RenderPanel; +class ViewportMouseEvent; + +namespace properties +{ +class BoolProperty; +} +} + +namespace rviz_default_plugins +{ +namespace tools +{ + +class RVIZ_DEFAULT_PLUGINS_PUBLIC InteractionTool : public rviz_common::Tool +{ + Q_OBJECT + +public: + InteractionTool(); + virtual ~InteractionTool(); + + void onInitialize() override; + + void activate() override; + void deactivate() override; + + int processMouseEvent(rviz_common::ViewportMouseEvent & event) override; + int processKeyEvent(QKeyEvent * event, rviz_common::RenderPanel * panel) override; + +public Q_SLOTS: + void hideInactivePropertyChanged() {} + +protected: + inline bool isMouseEventDragging(const rviz_common::ViewportMouseEvent & event) + { + // We are dragging if a button was down and is still down + Qt::MouseButtons buttons = event.buttons_down & + (Qt::LeftButton | Qt::RightButton | Qt::MidButton); + if (event.type == QEvent::MouseButtonPress) { + buttons &= ~event.acting_button; + } + return buttons != 0; + } + + /// Check if the mouse has moved from one object to another and update focus accordingly. + void updateFocus(const rviz_common::ViewportMouseEvent & event); + + void processInteraction(rviz_common::ViewportMouseEvent & event, const bool dragging); + + /// The object (control) which currently has the mouse focus. + rviz_common::InteractiveObjectWPtr focused_object_; + + uint64_t last_selection_frame_count_; + + MoveTool move_tool_; + + std::unique_ptr hide_inactive_property_; +}; + +} // namespace tools +} // namespace rviz_default_plugins + +#endif // RVIZ_DEFAULT_PLUGINS__TOOLS__INTERACTION__INTERACTION_TOOL_HPP_ diff --git a/rviz_default_plugins/plugins_description.xml b/rviz_default_plugins/plugins_description.xml index 9cef26970..2002d3c66 100644 --- a/rviz_default_plugins/plugins_description.xml +++ b/rviz_default_plugins/plugins_description.xml @@ -337,6 +337,17 @@ + + + Interact with interactive markers. Mouse actions not on + interactive markers fall back to moving the camera. + + + + +#include +#include +#include +#include +#include + +#include "rviz_common/display_context.hpp" +#include "rviz_common/interaction/forwards.hpp" +#include "rviz_common/interaction/handler_manager_iface.hpp" +#include "rviz_common/interaction/selection_manager_iface.hpp" +#include "rviz_common/interaction/selection_handler.hpp" +#include "rviz_common/load_resource.hpp" +#include "rviz_common/properties/bool_property.hpp" +#include "rviz_common/render_panel.hpp" +#include "rviz_common/view_controller.hpp" +#include "rviz_common/viewport_mouse_event.hpp" + +#include "rviz_default_plugins/tools/interaction/interaction_tool.hpp" + +namespace rviz_default_plugins +{ +namespace tools +{ + +InteractionTool::InteractionTool() +{ + shortcut_key_ = 'i'; + hide_inactive_property_ = std::make_unique( + "Hide Inactive Objects", + true, + "While holding down a mouse button, hide all other Interactive Objects.", + getPropertyContainer(), + SLOT(hideInactivePropertyChanged()), + this); +} + +InteractionTool::~InteractionTool() = default; + +void InteractionTool::onInitialize() +{ + move_tool_.initialize(context_); + last_selection_frame_count_ = context_->getFrameCount(); + deactivate(); +} + +void InteractionTool::activate() +{ + context_->getHandlerManager()->enableInteraction(true); + context_->getSelectionManager()->setTextureSize(1); +} + +void InteractionTool::deactivate() +{ + context_->getHandlerManager()->enableInteraction(false); +} + +void InteractionTool::updateFocus(const rviz_common::ViewportMouseEvent & event) +{ + const auto selection_manager = context_->getSelectionManager(); + // Select exactly 1 pixel + selection_manager->select( + event.panel->getRenderWindow(), + event.x, + event.y, + event.x + 1, + event.y + 1, + rviz_common::interaction::SelectionManagerIface::SelectType::Replace); + + const rviz_common::interaction::M_Picked results = selection_manager->getSelection(); + + last_selection_frame_count_ = context_->getFrameCount(); + + rviz_common::InteractiveObjectPtr new_focused_object; + + // look for a valid handle in the result. + auto result_it = results.begin(); + if (result_it != results.end()) { + const rviz_common::interaction::Picked pick = result_it->second; + const auto handler = context_->getHandlerManager()->getHandler(pick.handle); + if (pick.pixel_count > 0 && handler) { + const rviz_common::InteractiveObjectPtr object = handler->getInteractiveObject().lock(); + if (object && object->isInteractive()) { + new_focused_object = object; + } + } + } + + // If the mouse has gone from one object to another, defocus the old + // and focus the new. + rviz_common::InteractiveObjectPtr new_obj = new_focused_object; + rviz_common::InteractiveObjectPtr old_obj = focused_object_.lock(); + if (new_obj != old_obj) { + // Only copy the event contents here, once we know we need to use + // a modified version of it. + rviz_common::ViewportMouseEvent event_copy = event; + if (old_obj) { + event_copy.type = QEvent::FocusOut; + old_obj->handleMouseEvent(event_copy); + } + + if (new_obj) { + event_copy.type = QEvent::FocusIn; + new_obj->handleMouseEvent(event_copy); + } + } + + focused_object_ = new_focused_object; +} + +int InteractionTool::processMouseEvent(rviz_common::ViewportMouseEvent & event) +{ + int flags = 0; + + if (event.panel->contextMenuVisible()) { + return flags; + } + + // make sure we let the vis. manager render at least one frame between selection updates + const bool need_selection_update = context_->getFrameCount() > last_selection_frame_count_; + + const bool dragging = isMouseEventDragging(event); + + // unless we're dragging, check if there's a new object under the mouse + if (need_selection_update && + !dragging && + event.type != QEvent::MouseButtonRelease) + { + updateFocus(event); + flags = Render; + } + + processInteraction(event, dragging); + + if (event.type == QEvent::MouseButtonRelease) { + updateFocus(event); + } + + return flags; +} + +int InteractionTool::processKeyEvent(QKeyEvent * event, rviz_common::RenderPanel * panel) +{ + return move_tool_.processKeyEvent(event, panel); +} + +void InteractionTool::processInteraction( + rviz_common::ViewportMouseEvent & event, + const bool dragging) +{ + rviz_common::InteractiveObjectPtr focused_object = focused_object_.lock(); + // Pass the mouse evenet to the interactive object + // If there is no interactive object, then fallback to the move tool + if (focused_object) { + focused_object->handleMouseEvent(event); + setCursor(focused_object->getCursor()); + // this will disable everything but the current interactive object + if (hide_inactive_property_->getBool()) { + context_->getHandlerManager()->enableInteraction(!dragging); + } + } else if (event.panel->getViewController()) { + move_tool_.processMouseEvent(event); + setCursor(move_tool_.getCursor()); + if (hide_inactive_property_->getBool()) { + context_->getHandlerManager()->enableInteraction(true); + } + } +} + +} // namespace tools +} // namespace rviz_default_plugins + +#include // NOLINT(build/include_order) +PLUGINLIB_EXPORT_CLASS(rviz_default_plugins::tools::InteractionTool, rviz_common::Tool)