From 53aefe84d451c7c0ff677a81a3304496da312dae Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Sat, 7 Jan 2012 15:16:44 -0600 Subject: [PATCH] gschem: Fix a bug with invert selection When invert selecting "nothing", all currently selected objects are deselected. This is annoying when you "miss" trying to invert select a small group of objects. This is now fixed such that "missing" and selecting "nothing" does not deselect everything. --- gschem/src/o_select.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c index 71e72e2..870f534 100644 --- a/gschem/src/o_select.c +++ b/gschem/src/o_select.c @@ -284,6 +284,7 @@ void o_select_box_search(GSCHEM_TOPLEVEL *w_current) OBJECT *o_current=NULL; int count = 0; /* object count */ int SHIFTKEY = w_current->SHIFTKEY; + int CONTROLKEY = w_current->CONTROLKEY; int left, right, top, bottom; const GList *iter; @@ -311,9 +312,9 @@ void o_select_box_search(GSCHEM_TOPLEVEL *w_current) } /* if there were no objects to be found in select box, count will be */ - /* zero, and you need to deselect anything remaining (unless the shift */ - /* key was pressed */ - if (count == 0 && !SHIFTKEY) { + /* zero, and you need to deselect anything remaining (except when the */ + /* shift or control keys are pressed) */ + if (count == 0 && !SHIFTKEY && !CONTROLKEY) { o_select_unselect_all (w_current); } i_update_menus(w_current); -- 1.7.2.5