diff --git a/src/plugins/projectexplorer/targetselector.cpp b/src/plugins/projectexplorer/targetselector.cpp
index 43799e27e52acbf605e574616f122cd27f5f4e27..8650bf6f96324f7c69418ef971ac64dc20338c0f 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;