1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-05 03:11:32 +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; 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()) if (iter==data.begin())
output = type; output = type;
@ -190,12 +192,27 @@ CSVRender::WorldspaceWidget::DropType CSVRender::WorldspaceWidget::getDropType (
CSVRender::WorldspaceWidget::dropRequirments CSVRender::WorldspaceWidget::dropRequirments
CSVRender::WorldspaceWidget::getDropRequirements (DropType type) const CSVRender::WorldspaceWidget::getDropRequirements (DropType type) const
{ {
if (type==Type_DebugProfile)
return canHandle;
return ignored; return ignored;
} }
bool CSVRender::WorldspaceWidget::handleDrop (const std::vector<CSMWorld::UniversalId>& data, bool CSVRender::WorldspaceWidget::handleDrop (const std::vector<CSMWorld::UniversalId>& data,
DropType type) 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; return false;
} }

View file

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