From 1d806961e4f8fb315d52356c21f044d95000ed98 Mon Sep 17 00:00:00 2001 From: jules Date: Sun, 11 Aug 2013 20:34:28 +0100 Subject: [PATCH] Avoided an assertion with very wide tooltip windows. --- modules/juce_gui_basics/windows/juce_TooltipWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp index 4873ea7e77..a57734b487 100644 --- a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp @@ -97,8 +97,8 @@ void TooltipWindow::showFor (const String& tip) else y += 6; - x = jlimit (parentArea.getX(), parentArea.getRight() - w, x); - y = jlimit (parentArea.getY(), parentArea.getBottom() - h, y); + x = jmax (parentArea.getX(), jmin (parentArea.getRight() - w, x)); + y = jmax (parentArea.getY(), jmin (parentArea.getBottom() - h, y)); setBounds (x, y, w, h); setVisible (true);