Change-Id: I68109c1721a0e16e140ee6c7e19055ecc4372a6e
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com
void Widget::onResize(int width, int height)
{
- bool isLarge = (getType() == WIDGET_SIZE_TYPE_4x4);
- m_MaxCount = GRID_COLS * (isLarge ? LARGE_GRID_ROWS : SMALL_GRID_ROWS);
-
+ /* FIXME: onResize() called twice with non-standard size (720x720) on the second time */
+ if (!m_MaxCount) {
+ bool isLarge = (getType() == WIDGET_SIZE_TYPE_4x4);
+ m_MaxCount = GRID_COLS * (isLarge ? LARGE_GRID_ROWS : SMALL_GRID_ROWS);
+ }
if (m_Gengrid) {
elm_gengrid_item_size_set(m_Gengrid->getEvasObject(), getWidth() / GRID_COLS, Ui::getScaledValue(ITEM_H));
}