Added validation in "Grid Settings" dialog to avoid negative grid width/height.

This commit is contained in:
David Capello 2010-04-25 21:30:29 -03:00
parent befd81c63b
commit 8e62794da0

View File

@ -154,6 +154,8 @@ void GridSettingsCommand::execute(Context* context)
bounds.y = grid_y->getTextInt();
bounds.w = grid_w->getTextInt();
bounds.h = grid_h->getTextInt();
bounds.w = MAX(bounds.w, 1);
bounds.h = MAX(bounds.h, 1);
UIContext::instance()->getSettings()->setGridBounds(bounds);