From 70824ade146ffc41957aa8cdd44df91568d5969e Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 14 Jan 2015 15:06:59 -0500 Subject: [PATCH] Allow shift to extend selection --- plugins/manipulator.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/manipulator.cpp b/plugins/manipulator.cpp index 15cc57022..489c8f35a 100644 --- a/plugins/manipulator.cpp +++ b/plugins/manipulator.cpp @@ -1071,6 +1071,7 @@ void viewscreen_unitlaborsst::calcSize() void viewscreen_unitlaborsst::feed(set *events) { + int8_t modstate = Core::getInstance().getModstate(); bool leave_all = events->count(interface_key::LEAVESCREEN_ALL); if (leave_all || events->count(interface_key::LEAVESCREEN)) { @@ -1283,16 +1284,16 @@ void viewscreen_unitlaborsst::feed(set *events) break; case DISP_COLUMN_SELECTED: - // left-click to select, right-click to extend selection - if (enabler->mouse_lbut) + // left-click to select, right-click or shift-click to extend selection + if (enabler->mouse_rbut || (enabler->mouse_lbut && (modstate & MOD_SHIFT))) { input_row = click_unit; - events->insert(interface_key::CUSTOM_X); + events->insert(interface_key::CUSTOM_SHIFT_X); } - if (enabler->mouse_rbut) + else if (enabler->mouse_lbut) { input_row = click_unit; - events->insert(interface_key::CUSTOM_SHIFT_X); + events->insert(interface_key::CUSTOM_X); } break;