1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

drag and drop works.

This commit is contained in:
Marek Kochanowicz 2014-02-13 20:19:51 +01:00
parent 1bcc6d6918
commit 40cc108e54

View File

@ -490,12 +490,11 @@ void CSVWorld::Table::dropEvent(QDropEvent *event)
if (dynamic_cast<const CSMWorld::TableMimeData*>(event->mimeData())->holdsType(display)) if (dynamic_cast<const CSMWorld::TableMimeData*>(event->mimeData())->holdsType(display))
{ {
const CSMWorld::TableMimeData* mime = dynamic_cast<const CSMWorld::TableMimeData*>(event->mimeData()); const CSMWorld::TableMimeData* mime = dynamic_cast<const CSMWorld::TableMimeData*> (event->mimeData());
CSMWorld::UniversalId record(mime->returnMatching(display)); CSMWorld::UniversalId record (mime->returnMatching (display));
mUndoStack.push (new CSMWorld::ModifyCommand ( *mModel, std::auto_ptr<CSMWorld::ModifyCommand> command (new CSMWorld::ModifyCommand
index, (*mProxyModel, index, QVariant (QString::fromStdString (record.getId()))));
QVariant(record.getId().c_str()) mUndoStack.push (command.release());
));
} }
} }