From 10ffba596883ec7e9cc7616540f3c4b70f8e6cfb Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@nokia.com> Date: Mon, 15 Feb 2010 14:23:14 +0100 Subject: [PATCH] Fix off by 1 addbuttonwidth error in targetselector Reviewed-by: Robert Loehning --- src/plugins/projectexplorer/targetselector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/targetselector.cpp b/src/plugins/projectexplorer/targetselector.cpp index 43799e27e52..8650bf6f963 100644 --- a/src/plugins/projectexplorer/targetselector.cpp +++ b/src/plugins/projectexplorer/targetselector.cpp @@ -139,7 +139,7 @@ void TargetSelector::mousePressEvent(QMouseEvent *event) // handle clicked target // check if user clicked on Build or Run if (event->y() > TARGET_HEIGHT * 3/5) { - if ((event->x() - (TARGET_WIDTH + 1) * index) - 2 > TARGET_WIDTH / 2) { + if ((event->x() - (ADDBUTTON_WIDTH + (TARGET_WIDTH + 1) * index)) - 2 > TARGET_WIDTH / 2) { m_targets[index].currentSubIndex = 1; } else { m_targets[index].currentSubIndex = 0; -- GitLab