Hello.
When I tested gengrid, sometimes gengrid renderd two times in different
shape in a moment.
So I checked gengrid code, I found cause in calc_job function.
calc_job added to ecore job after elm_gengrid_item_size_set and
elm_gengrid_item_append(,prepend,insert_before,insert_after).
Sometimes pan_smart's cvw and cvh is 0 at this time.
For Example,
If (item_width = 120, item_height = 120, horizontal = EINA_FALSE, item_count
= 8, cvw = 0, cvh = 0)
Then, nmax = 0 but nmax < 1 then nmax = 1
Then, minw = 120 (1*120), minh = 960 (8*120), and then pan_smart "changed"
callback called.
I don't know why this code is added.
if (nmax < 1) nmax = 1;
I attached patch file for this problem.
Can anybody check about this ?
Thanks.
Index: src/lib/elm_gengrid.c
===================================================================
--- src/lib/elm_gengrid.c (revision 56944)
+++ src/lib/elm_gengrid.c (working copy)
@@ -1280,20 +1280,20 @@ _calc_job(void *data)
else if (wd->item_width > 0)
nmax = cvw / wd->item_width;
- if (nmax < 1)
- nmax = 1;
-
- count = wd->count;
- if (wd->horizontal)
+ if (nmax)
{
- minw = ceil(count / (float)nmax) * wd->item_width;
- minh = nmax * wd->item_height;
+ count = wd->count;
+ if (wd->horizontal)
+ {
+ minw = ceil(count / (float)nmax) * wd->item_width;
+ minh = nmax * wd->item_height;
+ }
+ else
+ {
+ minw = nmax * wd->item_width;
+ minh = ceil(count / (float)nmax) * wd->item_height;
+ }
}
- else
- {
- minw = nmax * wd->item_width;
- minh = ceil(count / (float)nmax) * wd->item_height;
- }
if ((minw != wd->minw) || (minh != wd->minh))
{
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel