mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
fix widebar action removal
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -309,17 +309,15 @@ bool WideBar::checkHash(QByteArray const& old_hash) const
|
||||
return old_hash == getHash();
|
||||
}
|
||||
|
||||
void WideBar::setActionVisible(QAction* action, bool visible)
|
||||
void WideBar::removeAction(QAction* action)
|
||||
{
|
||||
auto iter = getMatching(action);
|
||||
if (iter == m_entries.end()) {
|
||||
if (iter == m_entries.end())
|
||||
return;
|
||||
}
|
||||
|
||||
iter->bar_action->setVisible(visible);
|
||||
|
||||
// NOTE: This is needed so that disabled actions get reflected on the button when it is made visible.
|
||||
static_cast<ActionButton*>(widgetForAction(iter->bar_action))->actionChanged();
|
||||
iter->bar_action->setVisible(false);
|
||||
removeAction(iter->bar_action);
|
||||
m_entries.erase(iter);
|
||||
}
|
||||
|
||||
#include "WideBar.moc"
|
||||
|
Reference in New Issue
Block a user