|
|
|
@ -224,8 +224,11 @@ 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));
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const CSMWorld::Pathgrid* source = getPathgridSource();
|
|
|
|
|
if (source)
|
|
|
|
@ -357,8 +360,11 @@ namespace CSVRender
|
|
|
|
|
const CSMWorld::Pathgrid* source = getPathgridSource();
|
|
|
|
|
if (source)
|
|
|
|
|
{
|
|
|
|
|
CSMWorld::IdTree* model = dynamic_cast<CSMWorld::IdTree*>(mData.getTableModel(
|
|
|
|
|
CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Want to remove nodes from end of list first
|
|
|
|
|
std::sort(mSelected.begin(), mSelected.end(), std::greater<int>());
|
|
|
|
@ -458,8 +464,11 @@ namespace CSVRender
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMWorld::IdTree* model = dynamic_cast<CSMWorld::IdTree*>(mData.getTableModel(
|
|
|
|
|
CSMWorld::UniversalId::Type_Pathgrids));
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int parentColumn = mPathgridCollection.findColumnIndex(CSMWorld::Columns::ColumnId_PathgridEdges);
|
|
|
|
|
|
|
|
|
@ -633,8 +642,11 @@ 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));
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int recordIndex = mPathgridCollection.getIndex(mId);
|
|
|
|
|
int parentColumn = mPathgridCollection.findColumnIndex(CSMWorld::Columns::ColumnId_PathgridEdges);
|
|
|
|
|