|
|
|
@ -224,11 +224,7 @@ namespace CSVRender
|
|
|
|
|
|
|
|
|
|
void Pathgrid::applyPoint(CSMWorld::CommandMacro& commands, const osg::Vec3d& worldPos)
|
|
|
|
|
{
|
|
|
|
|
CSMWorld::IdTree* model = dynamic_cast<CSMWorld::IdTree*>(mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
if (model == nullptr)
|
|
|
|
|
{
|
|
|
|
|
throw std::logic_error("CSVRender::Pathgrid: Attempt to add nested values to the non-nested model");
|
|
|
|
|
}
|
|
|
|
|
CSMWorld::IdTree* model = &dynamic_cast<CSMWorld::IdTree&>(*mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
|
|
|
|
|
const CSMWorld::Pathgrid* source = getPathgridSource();
|
|
|
|
|
if (source)
|
|
|
|
@ -360,11 +356,7 @@ namespace CSVRender
|
|
|
|
|
const CSMWorld::Pathgrid* source = getPathgridSource();
|
|
|
|
|
if (source)
|
|
|
|
|
{
|
|
|
|
|
CSMWorld::IdTree* model = dynamic_cast<CSMWorld::IdTree*>(mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
if (model == nullptr)
|
|
|
|
|
{
|
|
|
|
|
throw std::logic_error("CSVRender::Pathgrid: Attempt to add nested values to the non-nested model");
|
|
|
|
|
}
|
|
|
|
|
CSMWorld::IdTree* model = &dynamic_cast<CSMWorld::IdTree&>(*mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
|
|
|
|
|
// Want to remove nodes from end of list first
|
|
|
|
|
std::sort(mSelected.begin(), mSelected.end(), std::greater<int>());
|
|
|
|
@ -464,12 +456,7 @@ namespace CSVRender
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMWorld::IdTree* model = dynamic_cast<CSMWorld::IdTree*>(mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
if (model == nullptr)
|
|
|
|
|
{
|
|
|
|
|
throw std::logic_error("CSVRender::Pathgrid: Attempt to add nested values to the non-nested model");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMWorld::IdTree* model = &dynamic_cast<CSMWorld::IdTree&>(*mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
int parentColumn = mPathgridCollection.findColumnIndex(CSMWorld::Columns::ColumnId_PathgridEdges);
|
|
|
|
|
|
|
|
|
|
std::set<int, std::greater<int> >::iterator row;
|
|
|
|
@ -642,11 +629,7 @@ namespace CSVRender
|
|
|
|
|
void Pathgrid::addEdge(CSMWorld::CommandMacro& commands, const CSMWorld::Pathgrid& source, unsigned short node1,
|
|
|
|
|
unsigned short node2)
|
|
|
|
|
{
|
|
|
|
|
CSMWorld::IdTree* model = dynamic_cast<CSMWorld::IdTree*>(mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
if (model == nullptr)
|
|
|
|
|
{
|
|
|
|
|
throw std::logic_error("CSVRender::Pathgrid: Attempt to add nested values to the non-nested model");
|
|
|
|
|
}
|
|
|
|
|
CSMWorld::IdTree* model = &dynamic_cast<CSMWorld::IdTree&>(*mData.getTableModel(CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
|
|
|
|
|
int recordIndex = mPathgridCollection.getIndex(mId);
|
|
|
|
|
int parentColumn = mPathgridCollection.findColumnIndex(CSMWorld::Columns::ColumnId_PathgridEdges);
|
|
|
|
|