Don't show Plugin Views menu if there are no views
This commit is contained in:
parent
60e1c23a6b
commit
68bd5569ce
@ -161,13 +161,15 @@ namespace hex {
|
||||
ImGui::MenuItem((view->getName() + " View").c_str(), "", &view->getWindowOpenState());
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Plugin Views")) {
|
||||
for (auto &view : this->m_pluginViews) {
|
||||
if (view->hasViewMenuItemEntry())
|
||||
ImGui::MenuItem((view->getName() + " View").c_str(), "", &view->getWindowOpenState());
|
||||
}
|
||||
if (!this->m_pluginViews.empty()) {
|
||||
if (ImGui::BeginMenu("Plugin Views")) {
|
||||
for (auto &view : this->m_pluginViews) {
|
||||
if (view->hasViewMenuItemEntry())
|
||||
ImGui::MenuItem((view->getName() + " View").c_str(), "", &view->getWindowOpenState());
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
|
Loading…
Reference in New Issue
Block a user