Fix Grid creation to return the new Grid instead of the default one

This commit is contained in:
Martín Capello 2023-01-10 11:53:21 -03:00 committed by David Capello
parent 453d9c2168
commit 9910ab73f0

View File

@ -30,7 +30,7 @@ doc::Grid Grid_new(lua_State* L, int index)
// Convert Rectangle into a Grid
else if (lua_istable(L, index)) {
gfx::Rect rect = convert_args_into_rect(L, index);
doc::Grid grid(rect.size());
grid = Grid(rect.size());
grid.origin(rect.origin());
}
return grid;