Removed wireframe from perspective menu and fixed crash on right click (#575)
This commit is contained in:
@@ -1298,26 +1298,8 @@ namespace AZ::ViewportHelpers
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void EditorViewportWidget::OnTitleMenu(QMenu* menu)
|
||||
{
|
||||
const int nWireframe = gEnv->pConsole->GetCVar("r_wireframe")->GetIVal();
|
||||
QAction* action = menu->addAction(tr("Wireframe"));
|
||||
connect(action, &QAction::triggered, action, []()
|
||||
{
|
||||
ICVar* piVar(gEnv->pConsole->GetCVar("r_wireframe"));
|
||||
int nRenderMode = piVar->GetIVal();
|
||||
if (nRenderMode != R_WIREFRAME_MODE)
|
||||
{
|
||||
piVar->Set(R_WIREFRAME_MODE);
|
||||
}
|
||||
else
|
||||
{
|
||||
piVar->Set(R_SOLID_MODE);
|
||||
}
|
||||
});
|
||||
action->setCheckable(true);
|
||||
action->setChecked(nWireframe == R_WIREFRAME_MODE);
|
||||
|
||||
const bool bDisplayLabels = GetIEditor()->GetDisplaySettings()->IsDisplayLabels();
|
||||
action = menu->addAction(tr("Labels"));
|
||||
QAction* action = menu->addAction(tr("Labels"));
|
||||
connect(action, &QAction::triggered, this, [bDisplayLabels] {GetIEditor()->GetDisplaySettings()->DisplayLabels(!bDisplayLabels);
|
||||
});
|
||||
action->setCheckable(true);
|
||||
|
||||
Reference in New Issue
Block a user