Merge pull request #3806 from ctrlaltdavid/fix-bandwidth-dialog-opening

Fix Bandwidth Details dialog opening if click meter's pos when UI hidden
This commit is contained in:
Brad Hefta-Gaub 2014-11-16 08:49:15 -08:00
commit c5426914ff

View file

@ -1555,6 +1555,8 @@ void Application::checkBandwidthMeterClick() {
// ... to be called upon button release
if (Menu::getInstance()->isOptionChecked(MenuOption::Bandwidth) &&
Menu::getInstance()->isOptionChecked(MenuOption::Stats) &&
Menu::getInstance()->isOptionChecked(MenuOption::UserInterface) &&
glm::compMax(glm::abs(glm::ivec2(_mouseX - _mouseDragStartedX, _mouseY - _mouseDragStartedY)))
<= BANDWIDTH_METER_CLICK_MAX_DRAG_LENGTH
&& _bandwidthMeter.isWithinArea(_mouseX, _mouseY, _glWidget->width(), _glWidget->height())) {