Gems/GraphCanvas
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -2295,8 +2295,6 @@ namespace GraphCanvas
|
||||
{
|
||||
QScopedValueRollback<bool> allowMovement(m_allowMovement, false);
|
||||
|
||||
QRectF rect = boundingRect();
|
||||
|
||||
qreal originalHeight = boundingRect().height();
|
||||
qreal newHeight = boundingRect().height() + (newSize.height() - oldSize.height());
|
||||
|
||||
|
||||
@@ -3262,8 +3262,6 @@ namespace GraphCanvas
|
||||
{
|
||||
for (const auto& sceneMember : sceneMemberList)
|
||||
{
|
||||
QRectF boundingArea;
|
||||
|
||||
QGraphicsItem* sceneItem = nullptr;
|
||||
VisualRequestBus::EventResult(sceneItem, sceneMember->GetId(), &VisualRequests::AsGraphicsItem);
|
||||
|
||||
@@ -3292,8 +3290,6 @@ namespace GraphCanvas
|
||||
{
|
||||
for (const auto& sceneMember : sceneMemberList)
|
||||
{
|
||||
QRectF boundingArea;
|
||||
|
||||
QGraphicsItem* sceneItem = nullptr;
|
||||
VisualRequestBus::EventResult(sceneItem, sceneMember->GetId(), &VisualRequests::AsGraphicsItem);
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ namespace GraphCanvas
|
||||
|
||||
m_database.clear();
|
||||
|
||||
AZStd::function<void()> reloadFn = [this]()
|
||||
AZStd::function<void()> reloadFn = []()
|
||||
{
|
||||
// Collects all script assets for reloading
|
||||
AZ::Data::AssetCatalogRequests::AssetEnumerationCB collectAssetsCb = [this](const AZ::Data::AssetId, const AZ::Data::AssetInfo& info)
|
||||
AZ::Data::AssetCatalogRequests::AssetEnumerationCB collectAssetsCb = [](const AZ::Data::AssetId, const AZ::Data::AssetInfo& info)
|
||||
{
|
||||
// Check asset type
|
||||
if (info.m_assetType == azrtti_typeid<TranslationAsset>())
|
||||
|
||||
@@ -117,7 +117,6 @@ namespace GraphCanvas
|
||||
|
||||
void ParticleGraphicsItem::paint([[maybe_unused]] QPainter* painter, [[maybe_unused]] const QStyleOptionGraphicsItem* option, [[maybe_unused]] QWidget* widget)
|
||||
{
|
||||
static const float k_pulseWidth = 60.0f;
|
||||
painter->save();
|
||||
|
||||
float alpha = m_configuration.m_alphaStart;
|
||||
|
||||
@@ -291,8 +291,6 @@ namespace
|
||||
|
||||
QColor ParseColor(const QString& color)
|
||||
{
|
||||
QColor result;
|
||||
|
||||
QRegularExpressionMatch match;
|
||||
if ((match = hexColor.match(color)).hasMatch())
|
||||
{
|
||||
@@ -520,34 +518,6 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
QFont::Capitalization ParseFontVariant(const QString& value)
|
||||
{
|
||||
if (QString::compare(value, QLatin1String("normal"), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return QFont::MixedCase;
|
||||
}
|
||||
else if (QString::compare(value, QLatin1String("all-uppercase"), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return QFont::AllUppercase;
|
||||
}
|
||||
else if (QString::compare(value, QLatin1String("all-lowercase"), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return QFont::AllLowercase;
|
||||
}
|
||||
else if (QString::compare(value, QLatin1String("small-caps"), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return QFont::SmallCaps;
|
||||
}
|
||||
else if (QString::compare(value, QLatin1String("capitalize"), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return QFont::Capitalize;
|
||||
}
|
||||
else
|
||||
{
|
||||
return{};
|
||||
}
|
||||
}
|
||||
|
||||
bool IsFontStyleValid(const QString& value)
|
||||
{
|
||||
if (QString::compare(value, QLatin1String("normal"), Qt::CaseInsensitive) == 0 ||
|
||||
@@ -640,16 +610,6 @@ namespace
|
||||
return{};
|
||||
}
|
||||
|
||||
AZStd::string CreateStyleName(const Styling::Style& style)
|
||||
{
|
||||
const Styling::SelectorVector selectors = style.GetSelectors();
|
||||
return std::accumulate(selectors.cbegin(), selectors.cend(), AZStd::string(), [](const AZStd::string& a, const Styling::Selector& s) {
|
||||
return a + (a.empty() ? "" : ", ") + s.ToString();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
|
||||
@@ -1898,8 +1898,6 @@ namespace GraphCanvas
|
||||
targetConnectionType = ConnectionType::CT_Invalid;
|
||||
}
|
||||
|
||||
NodeId nodeId = initializingEndpoint.GetNodeId();
|
||||
|
||||
AZStd::vector< SlotId > slotIds;
|
||||
NodeRequestBus::EventResult(slotIds, initializingEndpoint.GetNodeId(), &NodeRequests::GetSlotIds);
|
||||
|
||||
@@ -2307,7 +2305,6 @@ namespace GraphCanvas
|
||||
|
||||
AZ::EntityId anchorEntity;
|
||||
float minDistance = -1;
|
||||
QPointF offset;
|
||||
AZStd::vector<AZ::EntityId> nearbyEntities;
|
||||
|
||||
FloatingElementAnchor floatingAnchor;
|
||||
@@ -2425,10 +2422,6 @@ namespace GraphCanvas
|
||||
// - Overall Alignment is a bit...non-deterministic right now, and can change for some reason.
|
||||
AZStd::queue< OrganizationHelper* > termimnalOrganizationHelpers;
|
||||
|
||||
QPointF minTerminalPointSpot(0,0);
|
||||
|
||||
AZ::Vector2 anchorPoint = CalculateAlignmentAnchorPoint(alignConfig);
|
||||
|
||||
// Tail recursed loop.
|
||||
while (!nextLayer.empty())
|
||||
{
|
||||
@@ -2487,10 +2480,6 @@ namespace GraphCanvas
|
||||
OrganizationHelper* helper = termimnalOrganizationHelpers.front();
|
||||
termimnalOrganizationHelpers.pop();
|
||||
|
||||
NodeId nodeId = helper->m_nodeId;
|
||||
|
||||
QRectF totalBoundingRect = helper->m_boundingArea;
|
||||
|
||||
OrganizationSpaceAllocationHelper leftAllocation;
|
||||
OrganizationSpaceAllocationHelper rightAllocation;
|
||||
|
||||
|
||||
@@ -58,18 +58,8 @@ namespace GraphCanvas
|
||||
}
|
||||
|
||||
// Find the line between the two rectangles.
|
||||
QPointF direction = rectA.center() - rectB.center();
|
||||
QLineF directionLine(rectA.center(), rectB.center());
|
||||
|
||||
QLineF aLine1;
|
||||
QLineF aLine2;
|
||||
QLineF aFinalLine;
|
||||
|
||||
QLineF bLine1;
|
||||
QLineF bLine2;
|
||||
QLineF bFinalLine;
|
||||
|
||||
|
||||
// Not strictly correct, but correct enough.
|
||||
//
|
||||
// Finds the two points on the line from center to center, and returns the distance between them.
|
||||
|
||||
-1
@@ -445,7 +445,6 @@ namespace GraphCanvas
|
||||
|
||||
if (newIndex >= 0)
|
||||
{
|
||||
QModelIndex index = m_presetsModel->index(newIndex, 0);
|
||||
m_ui->constructTypes->setCurrentIndex(newIndex);
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -1488,7 +1488,6 @@ namespace GraphCanvas
|
||||
|
||||
void GraphCanvasGraphicsView::SaveViewParams()
|
||||
{
|
||||
QPointF centerPoint = mapToScene(rect().center());
|
||||
QPointF anchorPoint = mapToScene(rect().topLeft());
|
||||
|
||||
m_viewParams.m_anchorPointX = aznumeric_cast<float>(anchorPoint.x());
|
||||
|
||||
-2
@@ -202,8 +202,6 @@ namespace GraphCanvas
|
||||
AZStd::list<const GraphCanvas::GraphCanvasTreeItem*> exploreItems;
|
||||
exploreItems.push_back(treeItem);
|
||||
|
||||
const QModelIndex k_flagIndex;
|
||||
|
||||
while (!exploreItems.empty())
|
||||
{
|
||||
const GraphCanvas::GraphCanvasTreeItem* currentItem = exploreItems.front();
|
||||
|
||||
Reference in New Issue
Block a user