iconGrid: Initialize properties in _init

While this is good style anyway, after the latest appDisplay changes
the first call to get_preferred_height() happens before we properly
compute those properties, resulting in a size request of NaN that
triggers a Clutter warning.
This commit is contained in:
Florian Müllner 2013-09-05 17:59:41 +02:00
parent 32b964e9b7
commit 39c4fa1bf0

View File

@ -533,6 +533,9 @@ const PaginatedIconGrid = new Lang.Class({
_init: function(params) {
this.parent(params);
this._nPages = 0;
this._rowsPerPage = 0;
this._spaceBetweenPages = 0;
this._childrenPerPage = 0;
},
_getPreferredHeight: function (grid, forWidth, alloc) {