1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

add debug profiles to scene subviews view drag and drop

This commit is contained in:
Marc Zinnschlag 2014-09-13 18:54:29 +02:00
parent 3ed2edb7cb
commit 1254198d90
2 changed files with 19 additions and 1 deletions

View File

@ -177,6 +177,8 @@ CSVRender::WorldspaceWidget::DropType CSVRender::WorldspaceWidget::getDropType (
{
type = iter->getId().substr (0, 1)=="#" ? Type_CellsExterior : Type_CellsInterior;
}
else if (iter->getType()==CSMWorld::UniversalId::Type_DebugProfile)
type = Type_DebugProfile;
if (iter==data.begin())
output = type;
@ -190,12 +192,27 @@ CSVRender::WorldspaceWidget::DropType CSVRender::WorldspaceWidget::getDropType (
CSVRender::WorldspaceWidget::dropRequirments
CSVRender::WorldspaceWidget::getDropRequirements (DropType type) const
{
if (type==Type_DebugProfile)
return canHandle;
return ignored;
}
bool CSVRender::WorldspaceWidget::handleDrop (const std::vector<CSMWorld::UniversalId>& data,
DropType type)
{
if (type==Type_DebugProfile)
{
if (mRun)
{
for (std::vector<CSMWorld::UniversalId>::const_iterator iter (data.begin());
iter!=data.end(); ++iter)
mRun->addProfile (iter->getId());
}
return true;
}
return false;
}

View File

@ -40,7 +40,8 @@ namespace CSVRender
{
Type_CellsInterior,
Type_CellsExterior,
Type_Other
Type_Other,
Type_DebugProfile
};
enum dropRequirments