more fixes after rebase

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-16 17:05:50 -07:00
parent f0fa62bde3
commit b8787739e1
4 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -462,7 +462,7 @@ void CViewportTitleDlg::AddFOVMenus(QMenu* menu, std::function<void(float)> call
{
fov = std::max(1.0f, f);
fov = std::min(120.0f, f);
QAction* action = menu->addAction(customPresets[i]);
QAction* action = menu->addAction(customPreset);
connect(action, &QAction::triggered, action, [fov, callback](){ callback(fov); });
}
}
@@ -536,7 +536,7 @@ void CViewportTitleDlg::AddAspectRatioMenus(QMenu* menu, std::function<void(int,
for (const QString& customPreset : customPresets)
{
if (customPresets[i].isEmpty())
if (customPreset.isEmpty())
{
break;
}
@@ -550,7 +550,7 @@ void CViewportTitleDlg::AddAspectRatioMenus(QMenu* menu, std::function<void(int,
Q_ASSERT(ok);
unsigned int height = matches.captured(2).toInt(&ok);
Q_ASSERT(ok);
QAction* action = menu->addAction(customPresets[i]);
QAction* action = menu->addAction(customPreset);
connect(action, &QAction::triggered, action, [width, height, callback]() {callback(width, height); });
}
}
@@ -254,8 +254,8 @@ namespace AzToolsFramework
QRect globalRect = m_editor->GetWidgetAndVisibleChildrenGlobalRect(dragRowWidget);
int top = mapFromGlobal(globalRect.topLeft()).y();
int imageHeight = dragImage.height() / dragImage.devicePixelRatioF();
int imageWidth = dragImage.width() / dragImage.devicePixelRatioF();
int imageHeight = static_cast<int>(dragImage.height() / dragImage.devicePixelRatioF());
int imageWidth = static_cast<int>(dragImage.width() / dragImage.devicePixelRatioF());
QRect currRect = QRect(QPoint(LeftMargin + 1, top), QPoint(LeftMargin + 1 + imageWidth, top + imageHeight));
painter.setOpacity(alpha);
@@ -1867,7 +1867,7 @@ namespace AzToolsFramework
}
const auto dpr = devicePixelRatioF();
QPixmap dragImage(width * dpr, height * dpr);
QPixmap dragImage(static_cast<int>(width * dpr), static_cast<int>(height * dpr));
dragImage.setDevicePixelRatio(dpr);
dragImage.fill(Qt::transparent);