Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 5, 2024
2 parents 8320e2c + 6047ab6 commit 6e596d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion laf
9 changes: 8 additions & 1 deletion src/app/ui/layer_frame_comboboxes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,17 @@ void fill_area_combobox(const doc::Sprite* sprite, ui::ComboBox* area, const std
if (defArea == kSelectedCanvas)
area->setSelectedItemIndex(i);

for (auto slice : sprite->slices()) {
std::vector<doc::Slice*> sliceList;
for (auto* slice : sprite->slices()) {
if (slice->name().empty())
continue;

sliceList.push_back(slice);
}
std::sort(sliceList.begin(),
sliceList.end(),
[](doc::Slice* a, doc::Slice* b) { return a->name() < b->name(); });
for (auto* slice : sliceList) {
i = area->addItem(new SliceListItem(slice));
if (defArea == slice->name())
area->setSelectedItemIndex(i);
Expand Down

0 comments on commit 6e596d1

Please sign in to comment.