UndoDropDown.cpp 726 B

12345678910111213141516171819202122232425262728
  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 "EditorDefs.h"
  9. #include "UndoDropDown.h"
  10. // Editor
  11. #include "Undo/Undo.h" // for CUndoManager
  12. /////////////////////////////////////////////////////////////////////////////
  13. // Turns listener callbacks into signals
  14. UndoStackStateAdapter::UndoStackStateAdapter(QObject* parent /* = nullptr */)
  15. : QObject(parent)
  16. {
  17. GetIEditor()->GetUndoManager()->AddListener(this);
  18. }
  19. UndoStackStateAdapter::~UndoStackStateAdapter()
  20. {
  21. GetIEditor()->GetUndoManager()->RemoveListener(this);
  22. }