Android: ensure unique IDs when extracting style data for layers
Indeterminate progress drawables can consist of multiple layers that don't necessarily have an ID. Ensure that the extracted file names contains unique IDs to avoid extracted layers overwriting each other. Task-number: QTBUG-35081 Change-Id: I3dc48bf363510ded9b955aa51fa479c607541169 Reviewed-by: BogDan Vatra <bogdan@kde.org>bb10
parent
8097d67293
commit
fedd1ba84d
|
|
@ -532,8 +532,11 @@ public class ExtractStyle {
|
|||
JSONArray array =new JSONArray();
|
||||
for (int i = 0; i < nr; i++)
|
||||
{
|
||||
JSONObject layerJsonObject=getDrawable(layers.getDrawable(i), filename+"__"+layers.getId(i));
|
||||
layerJsonObject.put("id", layers.getId(i));
|
||||
int id = layers.getId(i);
|
||||
if (id == -1)
|
||||
id = i;
|
||||
JSONObject layerJsonObject=getDrawable(layers.getDrawable(i), filename+"__"+id);
|
||||
layerJsonObject.put("id", id);
|
||||
array.put(layerJsonObject);
|
||||
}
|
||||
json.put("type", "layer");
|
||||
|
|
|
|||
Loading…
Reference in New Issue