Closed Willem3141 closed 8 years ago
I cannot reproduce this. How exactly are you adding the layer beta?
I added the layer by the Layers > New Layer menu option. It does not matter how I add it though, even if I open an existing file with several layers I get this error.
If it helps, here is a screencast demonstrating the problem.
Can you set the environment variable IPEDEBUG (e.g. say "export IPEDEBUG=1") and check what output you get? I just tried it, it works and I get this output:
$ ipe
Debug messages enabled
size has changed to 937 x 487 (937 x 487)
action new_layer
action mode_rectangles
action movetolayer-beta
Thanks for the suggestion. Unfortunately, there doesn't seem to be anything related to the error:
wsonke@nbwin1339:~$ export IPEDEBUG=1
wsonke@nbwin1339:~$ ipe
Debug messages enabled
size has changed to 887 x 467 (887 x 467)
I don't get any line starting with action
. It seems that those are not emitted in the Qt version (in the source code, I can only find the corresponding ipeDebug
statements in appui_cocoa.cpp
and appui_win.cpp
).
Edit: I copied the debug statement from appui_cocoa.cpp
into appui_qt.cpp
and recompiled. Now I get the following output:
wsonke@nbwin1339:~/Downloads/ipe-7.2.2/src$ ipe
Debug messages enabled
size has changed to 887 x 467 (887 x 467)
action mode_lines
action new_layer
action movetolayer-&beta
That &
sign seems to be the culprit... maybe it is a focus marker?
Ah, very good. Which Qt version are you using?
I'm using Qt 5.5.1.
Does the same problem occur with the other generated menus, e.g. Properties -> Text Style or Snap -> Grid size?
You're right, indeed those menus exhibit similar symptoms, although none of them causes error messages like the layers menu:
style="&itemize"
in the XML(I didn't notice this before, as I normally use the popup menus to set those, and there is no problem with those.)
As a temporary solution, you could edit "actions.lua", and change the beginning of MODEL:paction
from
function MODEL:paction(a)
-- print("MODEL:paction(" .. a .. ")")
to
function MODEL:paction(a1)
local a = a1:gsub("&", "")
-- print("MODEL:paction(" .. a .. ")")
This is not a full solution, because now layer names containing an ampersand will not work anymore (not sure if that was ever supported), and similar for ampersands in property names (but there are none in the standard style sheets).
I hope this works as I can't check it - I'm still on Qt 5.2, where the problem doesn't occur. Another silent Qt behaviour change that bites us :-(
This patch indeed fixes the issue with the layer menu for me. Thanks!
I get a Lua error when trying to move objects to another layer.
To reproduce:
This throws the following error:
A workaround for me is to right-click on the element and to set the layer there; this works normally.
I'm using Ipe 7.2.2 on Kubuntu (Linux).