Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
// Original file Copyright Crytek GMBH or its affiliates, used under license.
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Description : CViewportTitleDlg implementation file
|
||||
|
||||
@@ -167,6 +162,7 @@ void CViewportTitleDlg::SetupCameraDropdownMenu()
|
||||
m_cameraSpeed = new QComboBox(cameraMenu);
|
||||
m_cameraSpeed->setEditable(true);
|
||||
m_cameraSpeed->setValidator(new QDoubleValidator(m_minSpeed, m_maxSpeed, m_numDecimals, m_cameraSpeed));
|
||||
m_cameraSpeed->installEventFilter(this);
|
||||
|
||||
QHBoxLayout* cameraSpeedLayout = new QHBoxLayout;
|
||||
cameraSpeedLayout->addWidget(cameraSpeedLabel);
|
||||
@@ -820,6 +816,21 @@ void CViewportTitleDlg::UpdateCustomPresets(const QString& text, QStringList& cu
|
||||
|
||||
bool CViewportTitleDlg::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
if (object == m_cameraSpeed)
|
||||
{
|
||||
if (event->type() == QEvent::FocusIn)
|
||||
{
|
||||
QTimer::singleShot(
|
||||
0, this,
|
||||
[this]
|
||||
{
|
||||
m_cameraSpeed->lineEdit()->selectAll();
|
||||
});
|
||||
}
|
||||
|
||||
return m_cameraSpeed->eventFilter(object, event);
|
||||
}
|
||||
|
||||
bool consumeEvent = false;
|
||||
|
||||
// These events are forwarded from the toolbar that took ownership of our widgets
|
||||
|
||||
Reference in New Issue
Block a user