1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-05-31 02:41:34 +00:00

Don't allow viewing non-existent cells from the regionmap.

This commit is contained in:
cc9cii 2014-10-16 07:36:47 +11:00
parent 094f046087
commit 7cdab41501

View file

@ -61,7 +61,7 @@ void CSVWorld::RegionMap::contextMenuEvent (QContextMenuEvent *event)
menu.addAction (mViewInTableAction);
}
if (selectionModel()->selectedIndexes().size()>0)
if (selectionModel()->selectedIndexes().size()>0 && selectedNonExistentCells!=1)
menu.addAction (mViewAction);
menu.exec (event->globalPos());
@ -400,7 +400,7 @@ void CSVWorld::RegionMap::dropEvent (QDropEvent* event)
QModelIndex index2(cellsModel->getModelIndex (cellId,
cellsModel->findColumnIndex (CSMWorld::Columns::ColumnId_Region)));
mDocument.getUndoStack().push(new CSMWorld::ModifyCommand
mDocument.getUndoStack().push(new CSMWorld::ModifyCommand
(*cellsModel, index2, QString::fromUtf8(record.getId().c_str())));
mRegionId = record.getId();