Skip to content

Commit 67791e8

Browse files
committed
Prevent dropping an asset in an empty Outliner
Signed-off-by: Danilo Aimini <[email protected]>
1 parent ae19572 commit 67791e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,12 @@ namespace AzToolsFramework
737737
[[maybe_unused]] int column,
738738
const QModelIndex& parent) const
739739
{
740+
// Can only drop assets if a level is loaded!
741+
if (rowCount() == 0)
742+
{
743+
return false;
744+
}
745+
740746
if (action != Qt::DropAction::CopyAction)
741747
{
742748
// we can only 'move' entityIds, and that will already be handled at this point

0 commit comments

Comments
 (0)