mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Show all frame tags on "Go to frame" by default
This commit is contained in:
parent
7156c4ae98
commit
08c70cc6ab
@ -158,19 +158,31 @@ private:
|
||||
: m_frameTags(frameTags) {
|
||||
setEditable(true);
|
||||
getEntryWidget()->Change.connect(&TagsEntry::onEntryChange, this);
|
||||
fill(true);
|
||||
}
|
||||
|
||||
private:
|
||||
void onEntryChange() {
|
||||
void fill(bool all) {
|
||||
removeAllItems();
|
||||
closeListBox();
|
||||
|
||||
MatchWords match(getEntryWidget()->text());
|
||||
|
||||
bool matchAny = false;
|
||||
for (const auto& frameTag : m_frameTags) {
|
||||
if (match(frameTag->name()))
|
||||
if (match(frameTag->name())) {
|
||||
matchAny = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (const auto& frameTag : m_frameTags) {
|
||||
if (all || !matchAny || match(frameTag->name()))
|
||||
addItem(frameTag->name());
|
||||
}
|
||||
}
|
||||
|
||||
void onEntryChange() {
|
||||
closeListBox();
|
||||
fill(false);
|
||||
if (getItemCount() > 0)
|
||||
openListBox();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user