[LYN-3160] Removed IEditor::Get/SetEditMode and some additional unused (related) content in the InfoBar.
This commit is contained in:
@@ -750,11 +750,6 @@ void MainWindow::InitActions()
|
||||
|
||||
am->AddAction(ID_TOOLBAR_SEPARATOR, QString());
|
||||
|
||||
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
am->AddAction(ID_TOOLBAR_WIDGET_REF_COORD, QString());
|
||||
}
|
||||
|
||||
am->AddAction(ID_TOOLBAR_WIDGET_UNDO, QString());
|
||||
am->AddAction(ID_TOOLBAR_WIDGET_REDO, QString());
|
||||
am->AddAction(ID_TOOLBAR_WIDGET_SNAP_ANGLE, QString());
|
||||
@@ -995,18 +990,6 @@ void MainWindow::InitActions()
|
||||
am->AddAction(ID_EDIT_RENAMEOBJECT, tr("Rename Object(s)..."))
|
||||
.SetStatusTip(tr("Rename Object"));
|
||||
|
||||
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
am->AddAction(ID_EDITMODE_SELECT, tr("Select mode"))
|
||||
.SetIcon(Style::icon("Select"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("1"))
|
||||
.SetToolTip(tr("Select mode (1)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Select object(s)"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditmodeSelect);
|
||||
}
|
||||
|
||||
am->AddAction(ID_EDITMODE_MOVE, tr("Move"))
|
||||
.SetIcon(Style::icon("Move"))
|
||||
.SetApplyHoverEffect()
|
||||
@@ -1032,69 +1015,6 @@ void MainWindow::InitActions()
|
||||
.SetStatusTip(tr("Select and scale selected object(s)"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditmodeScale);
|
||||
|
||||
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
am->AddAction(ID_EDITMODE_SELECTAREA, tr("Select terrain"))
|
||||
.SetIcon(Style::icon("Select_terrain"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("5"))
|
||||
.SetToolTip(tr("Select terrain (5)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Switch to terrain selection mode"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditmodeSelectarea);
|
||||
am->AddAction(ID_SELECT_AXIS_X, tr("Constrain to X axis"))
|
||||
.SetIcon(Style::icon("X_axis"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("Ctrl+1"))
|
||||
.SetToolTip(tr("Constrain to X axis (Ctrl+1)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Lock movement on X axis"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelectAxisX);
|
||||
am->AddAction(ID_SELECT_AXIS_Y, tr("Constrain to Y axis"))
|
||||
.SetIcon(Style::icon("Y_axis"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("Ctrl+2"))
|
||||
.SetToolTip(tr("Constrain to Y axis (Ctrl+2)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Lock movement on Y axis"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelectAxisY);
|
||||
am->AddAction(ID_SELECT_AXIS_Z, tr("Constrain to Z axis"))
|
||||
.SetIcon(Style::icon("Z_axis"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("Ctrl+3"))
|
||||
.SetToolTip(tr("Constrain to Z axis (Ctrl+3)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Lock movement on Z axis"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelectAxisZ);
|
||||
am->AddAction(ID_SELECT_AXIS_XY, tr("Constrain to XY plane"))
|
||||
.SetIcon(Style::icon("XY2_copy"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("Ctrl+4"))
|
||||
.SetToolTip(tr("Constrain to XY plane (Ctrl+4)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Lock movement on XY plane"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelectAxisXy);
|
||||
am->AddAction(ID_SELECT_AXIS_TERRAIN, tr("Constrain to terrain/geometry"))
|
||||
.SetIcon(Style::icon("Object_follow_terrain"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("Ctrl+5"))
|
||||
.SetToolTip(tr("Constrain to terrain/geometry (Ctrl+5)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Lock object movement to follow terrain"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelectAxisTerrain);
|
||||
am->AddAction(ID_SELECT_AXIS_SNAPTOALL, tr("Follow terrain and snap to objects"))
|
||||
.SetIcon(Style::icon("Follow_terrain"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetShortcut(tr("Ctrl+6"))
|
||||
.SetToolTip(tr("Follow terrain and snap to objects (Ctrl+6)"))
|
||||
.SetCheckable(true)
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelectAxisSnapToAll);
|
||||
am->AddAction(ID_OBJECTMODIFY_ALIGNTOGRID, tr("Align to grid"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelected)
|
||||
.SetIcon(Style::icon("Align_to_grid"))
|
||||
.SetApplyHoverEffect();
|
||||
}
|
||||
|
||||
am->AddAction(ID_SNAP_TO_GRID, tr("Snap to grid"))
|
||||
.SetIcon(Style::icon("Grid"))
|
||||
.SetApplyHoverEffect()
|
||||
@@ -1153,7 +1073,6 @@ void MainWindow::InitActions()
|
||||
am->AddAction(ID_CHANGEMOVESPEED_CHANGESTEP, tr("Change Step"))
|
||||
.SetStatusTip(tr("Change Flycam Movement Step"));
|
||||
am->AddAction(ID_DISPLAY_GOTOPOSITION, tr("Go to Position..."));
|
||||
am->AddAction(ID_DISPLAY_SETVECTOR, tr("Display Set Vector"));
|
||||
am->AddAction(ID_MODIFY_GOTO_SELECTION, tr("Center on Selection"))
|
||||
.SetShortcut(tr("Z"))
|
||||
.SetToolTip(tr("Center on Selection (Z)"))
|
||||
@@ -1500,62 +1419,6 @@ void MainWindow::InitToolBars()
|
||||
AdjustToolBarIconSize(static_cast<AzQtComponents::ToolBar::ToolBarIconSize>(gSettings.gui.nToolbarIconSize));
|
||||
}
|
||||
|
||||
QComboBox* MainWindow::CreateRefCoordComboBox()
|
||||
{
|
||||
// ID_REF_COORDS_SYS;
|
||||
auto coordSysCombo = new RefCoordComboBox(this);
|
||||
|
||||
connect(this, &MainWindow::ToggleRefCoordSys, coordSysCombo, &RefCoordComboBox::ToggleRefCoordSys);
|
||||
connect(this, &MainWindow::UpdateRefCoordSys, coordSysCombo, &RefCoordComboBox::UpdateRefCoordSys);
|
||||
|
||||
return coordSysCombo;
|
||||
}
|
||||
|
||||
RefCoordComboBox::RefCoordComboBox(QWidget* parent)
|
||||
: QComboBox(parent)
|
||||
{
|
||||
addItems(coordSysList());
|
||||
setCurrentIndex(0);
|
||||
|
||||
connect(this, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [](int index)
|
||||
{
|
||||
if (index >= 0 && index < LAST_COORD_SYSTEM)
|
||||
{
|
||||
RefCoordSys coordSys = (RefCoordSys)index;
|
||||
if (GetIEditor()->GetReferenceCoordSys() != index)
|
||||
{
|
||||
GetIEditor()->SetReferenceCoordSys(coordSys);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
UpdateRefCoordSys();
|
||||
}
|
||||
|
||||
QStringList RefCoordComboBox::coordSysList() const
|
||||
{
|
||||
static QStringList list = { tr("View"), tr("Local"), tr("Parent"), tr("World"), tr("Custom") };
|
||||
return list;
|
||||
}
|
||||
|
||||
void RefCoordComboBox::UpdateRefCoordSys()
|
||||
{
|
||||
RefCoordSys coordSys = GetIEditor()->GetReferenceCoordSys();
|
||||
if (coordSys >= 0 && coordSys < LAST_COORD_SYSTEM)
|
||||
{
|
||||
setCurrentIndex(coordSys);
|
||||
}
|
||||
}
|
||||
|
||||
void RefCoordComboBox::ToggleRefCoordSys()
|
||||
{
|
||||
QStringList coordSys = coordSysList();
|
||||
const int localIndex = coordSys.indexOf(tr("Local"));
|
||||
const int worldIndex = coordSys.indexOf(tr("World"));
|
||||
const int newIndex = currentIndex() == localIndex ? worldIndex : localIndex;
|
||||
setCurrentIndex(newIndex);
|
||||
}
|
||||
|
||||
QToolButton* MainWindow::CreateUndoRedoButton(int command)
|
||||
{
|
||||
// We do either undo or redo below, sort that out here
|
||||
@@ -2520,9 +2383,6 @@ QWidget* MainWindow::CreateToolbarWidget(int actionId)
|
||||
case ID_TOOLBAR_WIDGET_REDO:
|
||||
w = CreateUndoRedoButton(ID_REDO);
|
||||
break;
|
||||
case ID_TOOLBAR_WIDGET_REF_COORD:
|
||||
w = CreateRefCoordComboBox();
|
||||
break;
|
||||
case ID_TOOLBAR_WIDGET_SNAP_GRID:
|
||||
w = CreateSnapToGridWidget();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user