diff --git a/doomsday/client/src/ui/framework/gridlayout.cpp b/doomsday/client/src/ui/framework/gridlayout.cpp index 3f4552425c..a1277b2ec5 100644 --- a/doomsday/client/src/ui/framework/gridlayout.cpp +++ b/doomsday/client/src/ui/framework/gridlayout.cpp @@ -25,6 +25,8 @@ using namespace de; DENG2_PIMPL(GridLayout) { + typedef QMap CellAlignments; + WidgetList widgets; Mode mode; int maxCols; @@ -37,7 +39,7 @@ DENG2_PIMPL(GridLayout) Rule const *fixedCellWidth; Rule const *fixedCellHeight; QMap fixedColWidths; - QMap cellAlignment; + CellAlignments cellAlignment; Rule const *colPad; Rule const *rowPad; @@ -268,15 +270,12 @@ DENG2_PIMPL(GridLayout) ui::Alignment alignment(Vector2i pos) const { - if(cellAlignment.contains(pos)) - { - return cellAlignment[pos]; - } - if(cols.at(pos.x)->cellAlign) + CellAlignments::const_iterator found = cellAlignment.find(pos); + if(found != cellAlignment.end()) { - return cols.at(pos.x)->cellAlign; + return found.value(); } - return ui::AlignTopLeft; + return cols.at(pos.x)->cellAlign; } /**