fix: Don't restore toolbar items when they're empty
This commit is contained in:
parent
ecb9537c4e
commit
a172e89620
@ -585,13 +585,13 @@ namespace hex::plugin::builtin {
|
||||
if (data.is_null())
|
||||
return;
|
||||
|
||||
for (auto &[priority, menuItem] : ContentRegistry::Interface::impl::getMenuItemsMutable())
|
||||
menuItem.toolbarIndex = -1;
|
||||
|
||||
auto toolbarItems = data.get<std::map<i32, std::pair<std::string, u32>>>();
|
||||
if (toolbarItems.empty())
|
||||
return;
|
||||
|
||||
for (auto &[priority, menuItem] : ContentRegistry::Interface::impl::getMenuItemsMutable())
|
||||
menuItem.toolbarIndex = -1;
|
||||
|
||||
for (auto &[priority, menuItem] : ContentRegistry::Interface::impl::getMenuItemsMutable()) {
|
||||
for (const auto &[index, value] : toolbarItems) {
|
||||
const auto &[name, color] = value;
|
||||
|
Loading…
Reference in New Issue
Block a user