From ae418f2538435484f852da126baaf21c85667a1d Mon Sep 17 00:00:00 2001 From: Marek Kochanowicz Date: Fri, 14 Feb 2014 12:46:15 +0100 Subject: [PATCH] nicer formatting --- apps/opencs/view/world/table.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 4d5554d86..7819a75c0 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -410,10 +410,10 @@ void CSVWorld::Table::tableSizeUpdate() switch (state) { - case CSMWorld::RecordBase::State_BaseOnly: ++size; break; - case CSMWorld::RecordBase::State_Modified: ++size; ++modified; break; - case CSMWorld::RecordBase::State_ModifiedOnly: ++size; ++modified; break; - case CSMWorld::RecordBase:: State_Deleted: ++deleted; ++modified; break; + case CSMWorld::RecordBase::State_BaseOnly: ++size; break; + case CSMWorld::RecordBase::State_Modified: ++size; ++modified; break; + case CSMWorld::RecordBase::State_ModifiedOnly: ++size; ++modified; break; + case CSMWorld::RecordBase:: State_Deleted: ++deleted; ++modified; break; } } } @@ -490,10 +490,14 @@ void CSVWorld::Table::dropEvent(QDropEvent *event) if (dynamic_cast(event->mimeData())->holdsType(display)) { - const CSMWorld::TableMimeData* mime = dynamic_cast (event->mimeData()); + const CSMWorld::TableMimeData* mime = dynamic_cast + (event->mimeData()); + CSMWorld::UniversalId record (mime->returnMatching (display)); + std::auto_ptr command (new CSMWorld::ModifyCommand (*mProxyModel, index, QVariant (QString::fromStdString (record.getId())))); + mUndoStack.push (command.release()); } }