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
|
||||
pr.pack(gfx::Size(width, height));
|
||||
|
||||
auto it = samples.begin();
|
||||
for (auto& rc : pr) {
|
||||
if (it->isDuplicated())
|
||||
auto it = pr.begin();
|
||||
for (auto& sample : samples) {
|
||||
if (sample.isDuplicated() ||
|
||||
sample.isEmpty())
|
||||
continue;
|
||||
|
||||
ASSERT(it != samples.end());
|
||||
it->setInTextureBounds(rc);
|
||||
++it;
|
||||
ASSERT(it != pr.end());
|
||||
sample.setInTextureBounds(*(it++));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue