mirror of https://github.com/aseprite/aseprite.git
Fix incorrect layout with --trim and --sheet-pack
This commit is contained in:
parent
ca1728fd38
commit
5d5aae7311
|
|
@ -376,14 +376,14 @@ public:
|
||||||
else
|
else
|
||||||
pr.pack(gfx::Size(width, height));
|
pr.pack(gfx::Size(width, height));
|
||||||
|
|
||||||
auto it = samples.begin();
|
auto it = pr.begin();
|
||||||
for (auto& rc : pr) {
|
for (auto& sample : samples) {
|
||||||
if (it->isDuplicated())
|
if (sample.isDuplicated() ||
|
||||||
|
sample.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ASSERT(it != samples.end());
|
ASSERT(it != pr.end());
|
||||||
it->setInTextureBounds(rc);
|
sample.setInTextureBounds(*(it++));
|
||||||
++it;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue