3
0

LayerExtenderContextMenu.cpp 1.0 KB

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Editor/Core/Core.h>
  9. #include <Editor/Menus/LayerExtenderContextMenu.h>
  10. #include <GraphCanvas/Widgets/NodePalette/NodePaletteTreeView.h>
  11. namespace LandscapeCanvasEditor
  12. {
  13. LayerExtenderContextMenu::LayerExtenderContextMenu(const GraphCanvas::NodePaletteConfig& nodePaletteConfig, QWidget* parent)
  14. : GraphCanvas::EditorContextMenu(LandscapeCanvas::LANDSCAPE_CANVAS_EDITOR_ID, parent)
  15. {
  16. AddNodePaletteMenuAction(nodePaletteConfig);
  17. }
  18. void LayerExtenderContextMenu::SetupDisplay()
  19. {
  20. GraphCanvas::EditorContextMenu::SetupDisplay();
  21. // Expand our node palette by default since it is the only thing showing and we don't have very many nodes to show
  22. m_nodePalette->GetTreeView()->expandAll();
  23. }
  24. #include <Source/Editor/Menus/moc_LayerExtenderContextMenu.cpp>
  25. }