mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-11 09:36:37 +00:00
Revert "Cleanup and slight change to pathgrid editing controls."
This reverts commit cc4655e9c7
.
This commit is contained in:
parent
cc4655e9c7
commit
bb81e89c08
@ -36,7 +36,6 @@ CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelI
|
||||
{
|
||||
IdTree& tree = static_cast<CSMWorld::IdTree&>(*mModel);
|
||||
|
||||
// ModifyNestedCommand will add its own command to change the modify status if needed
|
||||
mModifyNestedCommand = new ModifyNestedCommand(tree, mIndex, new_, this);
|
||||
setText(mModifyNestedCommand->text());
|
||||
}
|
||||
@ -49,7 +48,12 @@ CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelI
|
||||
{
|
||||
mHasRecordState = true;
|
||||
int stateColumnIndex = table->findColumnIndex(Columns::ColumnId_Modification);
|
||||
|
||||
int rowIndex = mIndex.row();
|
||||
if (mIndex.parent().isValid())
|
||||
{
|
||||
rowIndex = mIndex.parent().row();
|
||||
}
|
||||
|
||||
mRecordStateIndex = table->index(rowIndex, stateColumnIndex);
|
||||
mOldRecordState = static_cast<CSMWorld::RecordBase::State>(table->data(mRecordStateIndex).toInt());
|
||||
|
@ -265,7 +265,6 @@ namespace CSMWorld
|
||||
case 0: return; // return without saving
|
||||
case 1:
|
||||
{
|
||||
// Remove current and add new while adjusting each points connection count
|
||||
edges.erase(edges.begin()+subRowIndex);
|
||||
|
||||
if (static_cast<size_t>(edge.mV0) < points.size())
|
||||
@ -273,10 +272,10 @@ namespace CSMWorld
|
||||
|
||||
edge.mV0 = value.toInt();
|
||||
|
||||
// Place in correct order
|
||||
if (static_cast<size_t>(edge.mV0) < points.size())
|
||||
++points[edge.mV0].mConnectionNum;
|
||||
|
||||
// Place in correct order
|
||||
ESM::Pathgrid::EdgeList::iterator it = edges.begin();
|
||||
for (; it != edges.end(); ++it)
|
||||
{
|
||||
|
@ -332,7 +332,7 @@ void CSVRender::PagedWorldspaceWidget::pathgridAboutToBeRemoved (const QModelInd
|
||||
|
||||
void CSVRender::PagedWorldspaceWidget::pathgridAdded(const QModelIndex& parent, int start, int end)
|
||||
{
|
||||
const CSMWorld::SubCellCollection<CSMWorld::Pathgrid>& pathgrids = mDocument.getData().getPathgrids();
|
||||
const CSMWorld::SubCellCollection<CSMWorld::Pathgrid>& pathgrids = mDocument.getData().getPathgrids();
|
||||
|
||||
if (!parent.isValid())
|
||||
{
|
||||
|
@ -131,10 +131,9 @@ namespace CSVRender
|
||||
if (!selection.empty())
|
||||
{
|
||||
mDragMode = DragMode_Move;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PathgridMode::secondaryEditStartDrag(const QPoint& pos)
|
||||
@ -149,11 +148,10 @@ namespace CSVRender
|
||||
mFromNode = SceneUtil::getPathgridNode(static_cast<unsigned short>(hit.index0));
|
||||
|
||||
tag->getPathgrid()->setupConnectionIndicator(mFromNode);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void PathgridMode::drag(const QPoint& pos, int diffX, int diffY, double speedFactor)
|
||||
|
Loading…
Reference in New Issue
Block a user