From 2014e0a1401fd8f29dbb52791814e42ecc1df09f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Bl=C3=A4sius?= Date: Wed, 26 Aug 2015 11:33:27 +0200 Subject: [PATCH] graph iplet should now also work with ipe versions 7.1.7 and 7.1.8 --- ipelets/graph/graph.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ipelets/graph/graph.lua b/ipelets/graph/graph.lua index c2cf500..7889367 100644 --- a/ipelets/graph/graph.lua +++ b/ipelets/graph/graph.lua @@ -86,14 +86,21 @@ _G.EDITTOOL.graph_backup_key = _G.EDITTOOL.key -- overwriting function _G.EDITTOOL:key(code, modifiers, text) + -- The parameters of the key() function have changed in version + -- 7.1.7. Thus, we potentially have to remap the parameters. + if text == nil then + text = code + end self:graph_backup_key(code, modifiers, text) if deactivateGraphMode then return end -- react if and only if we are currently editing a mark and key ESC -- or SPACE is pressed - if text ~= "\027" and code ~= 0x20 then return end - if not editing then return end + -- if text ~= "\027" and code ~= 0x20 then return end + if text ~= "\027" and text ~= " " then return end + if not editing then return end + editing = false -- finding new and old position -- 2.34.1