EMotion FX: Automatically clear selection when closing skeleton outliner
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
This commit is contained in:
+4
-4
@@ -16,11 +16,8 @@
|
||||
#include <QVBoxLayout>
|
||||
#include <QHeaderView>
|
||||
|
||||
|
||||
namespace EMotionFX
|
||||
{
|
||||
int SkeletonOutlinerPlugin::s_iconSize = 16;
|
||||
|
||||
SkeletonOutlinerPlugin::SkeletonOutlinerPlugin()
|
||||
: EMStudio::DockWidgetPlugin()
|
||||
, m_mainWidget(nullptr)
|
||||
@@ -30,13 +27,16 @@ namespace EMotionFX
|
||||
|
||||
SkeletonOutlinerPlugin::~SkeletonOutlinerPlugin()
|
||||
{
|
||||
// Reset selection on close.
|
||||
m_skeletonModel->GetSelectionModel().clearSelection();
|
||||
m_skeletonModel.reset();
|
||||
|
||||
for (MCore::Command::Callback* callback : m_commandCallbacks)
|
||||
{
|
||||
CommandSystem::GetCommandManager()->RemoveCommandCallback(callback, true);
|
||||
}
|
||||
m_commandCallbacks.clear();
|
||||
|
||||
SkeletonOutlinerNotificationBus::Broadcast(&SkeletonOutlinerNotifications::SingleNodeSelectionChanged, nullptr, nullptr);
|
||||
EMotionFX::SkeletonOutlinerRequestBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <QTreeView>
|
||||
#endif
|
||||
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QLabel)
|
||||
|
||||
namespace EMotionFX
|
||||
@@ -73,7 +72,7 @@ namespace EMotionFX
|
||||
AZStd::unique_ptr<SkeletonModel> m_skeletonModel;
|
||||
QModelIndexList m_selectedRows;
|
||||
SkeletonSortFilterProxyModel* m_filterProxyModel;
|
||||
static int s_iconSize;
|
||||
static constexpr int s_iconSize = 16;
|
||||
|
||||
// Callbacks
|
||||
// Works for all commands that use the actor id as well as the joint name mixins
|
||||
|
||||
Reference in New Issue
Block a user