From 6eb134d36a4bd51f85001822125697da77277eee Mon Sep 17 00:00:00 2001 From: djes Date: Fri, 23 Sep 2016 16:21:44 +0200 Subject: [PATCH] Revert "CTRL key multiselect" This reverts commit 1089eb80b0a61d722743115a4fe2b3c4519411bf. --- PBMap.pb | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/PBMap.pb b/PBMap.pb index 2c4b00e..f35ecb6 100644 --- a/PBMap.pb +++ b/PBMap.pb @@ -1401,22 +1401,21 @@ Module PBMap Procedure CanvasEvents() Protected MouseX.i, MouseY.i Protected MarkerCoords.PixelCoordinates, *Tile.Tile, MapWidth = Pow(2, PBMap\Zoom) * PBMap\TileSize - Protected key.s, Touch.i - Static CtrlKey + Protected key.s, Touch.i, CtrlKey.i PBMap\Moving = #False Select EventType() Case #PB_EventType_KeyUp Select GetGadgetAttribute(PBMap\Gadget, #PB_Canvas_Key) Case #PB_Shortcut_Delete DeleteSelectedMarkers() + Case #PB_Canvas_Control + CtrlKey = #False + EndSelect + Case #PB_EventType_KeyDown + Select GetGadgetAttribute(PBMap\Gadget, #PB_Canvas_Key) + Case #PB_Canvas_Control + CtrlKey = #True EndSelect - If GetGadgetAttribute(PBMap\Gadget, #PB_Canvas_Modifiers)&#PB_Canvas_Control = 0 - CtrlKey = #False - EndIf - Case #PB_EventType_KeyDown - If GetGadgetAttribute(PBMap\Gadget, #PB_Canvas_Modifiers)&#PB_Canvas_Control <> 0 - CtrlKey = #True - EndIf Case #PB_EventType_LeftDoubleClick If PBMap\Mode = #MODE_DEFAULT Or PBMap\Mode = #MODE_SELECT ;Check if the mouse touch a marker, if so, jump to it @@ -1456,9 +1455,7 @@ Module PBMap PBMap\EditMarker = #False ;Check if we select marker(s) ForEach PBMap\Markers() - If CtrlKey = #False - PBMap\Markers()\Selected = #False ;If no CTRL key, deselect everything and select only the focused marker - EndIf + PBMap\Markers()\Selected = #False If PBMap\Markers()\Focus PBMap\Markers()\Selected = #True PBMap\EditMarker = #True;ListIndex(PBMap\Markers()) @@ -1744,8 +1741,8 @@ CompilerIf #PB_Compiler_IsMainFile CompilerEndIf ; IDE Options = PureBasic 5.50 (Windows - x64) -; CursorPosition = 1500 -; FirstLine = 1478 +; CursorPosition = 1514 +; FirstLine = 1487 ; Folding = ------------- ; EnableThread ; EnableXP