Follow-up Comment #4, bug #22046 (project wesnoth): I dont have the original code which gave me the original error. I tried to reproduce the error with the following code: (place the start event in any scenario.)
[event]
name= "start"
[lua]
code = <<
local helper = wesnoth.require("lua/helper.lua")
local T = helper.set_wml_tag_metatable {}
--equiavelent of a wml macro with the same name.
local function GUI_FORCE_WIDGET_MINIMUM_SIZE(w,h,
content)
return T.stacked_widget {
definition = "default",
T.stack {
T.layer {
T.row {
T.column {
T.spacer {
definition = "default",
width = w,
height = h
}
}
}
},
T.layer {
T.row {
grow_factor = 1,
T.column {
grow_factor = 1,
horizontal_grow = "true",
vertical_grow = "true",
content
}
}
}
}
}
end
local dialog = {
maximum_height = 700,
maximum_width = 850,
T.helptip { id =
"tooltip_large" }, -- mandatory field
T.tooltip { id =
"tooltip_large" }, -- mandatory field
T.grid {
T.row {
T.column {
T.listbox {
id = "listbox",
vertical_scrollbar_mode = "always",
T.list_definition {
T.row {
T.column {
T.toggle_panel {
T.grid {
T.row {
T.column {
GUI_FORCE_WIDGET_MINIMUM_SIZE(10,10,
T.image {
id =
"image"
}
)
}
}
}
}
}
}
}
}
}
}
}
}
local pre_show = function()
for i=1,20 do
-- fill image with a
non existent image and let
GUI_FORCE_WIDGET_MINIMUM_SIZE do it's job
wesnoth.set_dialog_value("some_non_existen_immage_92640.png",
"listbox", i , "image")
end
wesnoth.set_dialog_value(2,
"listbox")
end
wesnoth.show_dialog(dialog, pre_show);
>>
[/lua]
[/event]
but instead of the bug with h < 0 it gives ma a similar error with w < 0.
(line 1114 instead of 1119). I checked this at commit
51a2c0443fd8a381c88df8411f97bdf7da93c719.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?22046>
_______________________________________________
Nachricht gesendet von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs
