mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Hiding the tooltip when the window gets deactivated and reactivated.
This commit is contained in:
parent
067e128651
commit
79951630ec
1 changed files with 16 additions and 11 deletions
|
@ -2003,22 +2003,27 @@ void GLCanvas3D::render()
|
||||||
#endif // ENABLE_CAMERA_STATISTICS
|
#endif // ENABLE_CAMERA_STATISTICS
|
||||||
|
|
||||||
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
std::string tooltip = "";
|
std::string tooltip;
|
||||||
|
|
||||||
if (tooltip.empty())
|
// Negative coordinate means out of the window, likely because the window was deactivated.
|
||||||
tooltip = m_layers_editing.get_tooltip(*this);
|
// In that case the tooltip should be hidden.
|
||||||
|
if (m_mouse.position.x() >= 0. && m_mouse.position.y() >= 0.)
|
||||||
|
{
|
||||||
|
if (tooltip.empty())
|
||||||
|
tooltip = m_layers_editing.get_tooltip(*this);
|
||||||
|
|
||||||
if (tooltip.empty())
|
if (tooltip.empty())
|
||||||
tooltip = m_gizmos.get_tooltip();
|
tooltip = m_gizmos.get_tooltip();
|
||||||
|
|
||||||
if (tooltip.empty())
|
if (tooltip.empty())
|
||||||
tooltip = m_main_toolbar.get_tooltip();
|
tooltip = m_main_toolbar.get_tooltip();
|
||||||
|
|
||||||
if (tooltip.empty())
|
if (tooltip.empty())
|
||||||
tooltip = m_undoredo_toolbar.get_tooltip();
|
tooltip = m_undoredo_toolbar.get_tooltip();
|
||||||
|
|
||||||
if (tooltip.empty())
|
if (tooltip.empty())
|
||||||
tooltip = m_view_toolbar.get_tooltip();
|
tooltip = m_view_toolbar.get_tooltip();
|
||||||
|
}
|
||||||
|
|
||||||
set_tooltip(tooltip);
|
set_tooltip(tooltip);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue