[LYN-3419] First pass of removing unused logic for old viewport interaction model.

This commit is contained in:
Chris Galvan
2021-04-29 11:19:34 -05:00
parent fbdd26bbbc
commit 51a8696f69
15 changed files with 2 additions and 418 deletions
-80
View File
@@ -435,13 +435,6 @@ MainWindow::MainWindow(QWidget* parent)
setAcceptDrops(true);
#ifdef Q_OS_WIN
if (auto aed = QAbstractEventDispatcher::instance())
{
aed->installNativeEventFilter(this);
}
#endif
// special handling for escape key (outside ActionManager)
auto* escapeAction = new QAction(this);
escapeAction->setShortcut(QKeySequence(Qt::Key_Escape));
@@ -508,13 +501,6 @@ void MainWindow::SetActiveView(CLayoutViewPane* v)
MainWindow::~MainWindow()
{
#ifdef Q_OS_WIN
if (auto aed = QAbstractEventDispatcher::instance())
{
aed->removeNativeEventFilter(this);
}
#endif
AzToolsFramework::SourceControlNotificationBus::Handler::BusDisconnect();
delete m_toolbarManager;
@@ -938,22 +924,6 @@ void MainWindow::InitActions()
am->AddAction(ID_MODIFY_UNLINK, tr("Un-Parent"));
}
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
{
// implemented by EditorTransformComponentSelection when the new Viewport Interaction Model is enabled
am->AddAction(ID_EDIT_FREEZE, tr("Lock selection"))
.SetShortcut(tr("L"))
.SetToolTip(tr("Lock selection (L)"))
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditFreeze)
.SetIcon(Style::icon("Locked"))
.SetApplyHoverEffect();
am->AddAction(ID_EDIT_UNFREEZEALL, tr("Unlock all"))
.SetShortcut(tr("Ctrl+L"))
.SetToolTip(tr("Unlock All (Ctrl+L)"))
.SetIcon(Style::icon("Unlocked"))
.SetApplyHoverEffect();
}
am->AddAction(ID_EDIT_HOLD, tr("&Hold"))
.SetShortcut(tr("Ctrl+Alt+H"))
.SetToolTip(tr("&Hold (Ctrl+Alt+H)"))
@@ -987,7 +957,6 @@ void MainWindow::InitActions()
}
// Modify actions
am->AddAction(ID_MODIFY_OBJECT_HEIGHT, tr("Set Object(s) Height..."));
am->AddAction(ID_EDIT_RENAMEOBJECT, tr("Rename Object(s)..."))
.SetStatusTip(tr("Rename Object"));
@@ -1202,10 +1171,6 @@ void MainWindow::InitActions()
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
{
am->AddAction(ID_GENERATORS_LIGHTING, tr("&Sun Trajectory Tool"))
.SetIcon(Style::icon("Lighting"))
.SetApplyHoverEffect()
.SetStatusTip(tr("Bring up the terrain lighting dialog"));
am->AddAction(ID_TERRAIN_TIMEOFDAY, tr("Time Of Day"))
.SetStatusTip(tr("Open Time of Day Editor"));
}
@@ -1300,14 +1265,6 @@ void MainWindow::InitActions()
.SetToolTip(tr("Open Asset Browser"))
.SetApplyHoverEffect();
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
am->AddAction(ID_OPEN_MATERIAL_EDITOR, tr(LyViewPane::MaterialEditor))
.SetToolTip(tr("Open Material Editor"))
.SetIcon(Style::icon("Material"))
.SetApplyHoverEffect();
}
AZ::EBusReduceResult<bool, AZStd::logical_or<bool>> emfxEnabled(false);
using AnimationRequestBus = AzToolsFramework::EditorAnimationSystemRequestsBus;
using AnimationSystemType = AzToolsFramework::EditorAnimationSystemRequests::AnimationSystem;
@@ -1360,14 +1317,6 @@ void MainWindow::InitActions()
.SetApplyHoverEffect()
.Connect(&QAction::triggered, this, &MainWindow::OnGotoSelected);
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
{
am->AddAction(ID_OBJECTMODIFY_SETHEIGHT, tr("Set object(s) height"))
.SetIcon(QIcon(":/MainWindow/toolbars/object_toolbar-03.svg"))
.SetApplyHoverEffect()
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelected);
}
// Misc Toolbar Actions
am->AddAction(ID_OPEN_SUBSTANCE_EDITOR, tr("Open Substance Editor"))
.SetApplyHoverEffect();
@@ -2215,35 +2164,6 @@ void MainWindow::RegisterOpenWndCommands()
}
}
void MainWindow::MatEditSend(int param)
{
if (param == eMSM_Init || GetIEditor()->IsInMatEditMode())
{
// In MatEditMode this message is handled by CMatEditMainDlg, which doesn't have
// any view panes and opens MaterialDialog directly.
return;
}
if (QtViewPaneManager::instance()->OpenPane(LyViewPane::MaterialEditor))
{
GetIEditor()->GetMaterialManager()->SyncMaterialEditor();
}
}
#ifdef Q_OS_WIN
bool MainWindow::nativeEventFilter([[maybe_unused]] const QByteArray &eventType, void *message, long *)
{
MSG* msg = static_cast<MSG*>(message);
if (msg->message == WM_MATEDITSEND) // For supporting 3ds Max Exporter, Windows Only
{
MatEditSend(msg->wParam);
return true;
}
return false;
}
#endif
bool MainWindow::event(QEvent* event)
{
#ifdef Q_OS_MAC