fix: tristate toggle logic for tab visibilty (#5530)
Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
@@ -127,6 +127,27 @@ public:
|
||||
this->itemsChanged_();
|
||||
}
|
||||
|
||||
bool removeFirstMatching(std::function<bool(const T &)> matcher,
|
||||
void *caller = nullptr)
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
for (int index = 0; index < this->items_.size(); ++index)
|
||||
{
|
||||
T item = this->items_[index];
|
||||
if (matcher(item))
|
||||
{
|
||||
this->items_.erase(this->items_.begin() + index);
|
||||
SignalVectorItemEvent<T> args{item, index, caller};
|
||||
this->itemRemoved.invoke(args);
|
||||
this->itemsChanged_();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::vector<T> &raw() const
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
Reference in New Issue
Block a user