X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgrid.cpp;h=3b44ac857e0058e9e6d34de38ffd158aced3e17e;hb=HEAD;hp=6296098f511017c339058050a4a73eaba2c81de9;hpb=b30edd979e6e9c7acfaaf3a90903814a7e62a71e;p=libs%2Fgltk.git diff --git a/source/grid.cpp b/source/grid.cpp index 6296098..eb32cc9 100644 --- a/source/grid.cpp +++ b/source/grid.cpp @@ -3,11 +3,9 @@ namespace Msp { namespace GLtk { -Grid::Grid(Layout &l, unsigned c): +Grid::Grid(Layout &l, size_t c): Arrangement(l), - columns(c), - first_row(true), - column(0) + columns(c) { } void Grid::skip() @@ -17,6 +15,9 @@ void Grid::skip() void Grid::next_row() { + if(row_bottom.empty()) + throw arrangement_error("empty row not allowed"); + finish_row(); }