diff --git a/apps/opencs/view/render/unpagedworldspacewidget.cpp b/apps/opencs/view/render/unpagedworldspacewidget.cpp index 7072c17a6d..aab3791fce 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.cpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.cpp @@ -98,11 +98,11 @@ bool CSVRender::UnpagedWorldspaceWidget::handleDrop (const std::vectorgetId(); + mCell.reset (new Cell (getDocument().getData(), getSceneManager(), mCellId)); + update(); emit cellChanged(*data.begin()); - /// \todo replace mCell - return true; } diff --git a/apps/opencs/view/render/worldspacewidget.cpp b/apps/opencs/view/render/worldspacewidget.cpp index c95d2f51dd..7f1d06c919 100644 --- a/apps/opencs/view/render/worldspacewidget.cpp +++ b/apps/opencs/view/render/worldspacewidget.cpp @@ -213,6 +213,11 @@ void CSVRender::WorldspaceWidget::addVisibilitySelectorButtons ( tool->addButton (":armor.png", Element_Pathgrid, ":armor.png", "Pathgrid"); } +CSMDoc::Document& CSVRender::WorldspaceWidget::getDocument() +{ + return mDocument; +} + void CSVRender::WorldspaceWidget::dragEnterEvent (QDragEnterEvent* event) { event->accept(); diff --git a/apps/opencs/view/render/worldspacewidget.hpp b/apps/opencs/view/render/worldspacewidget.hpp index 41d4964d02..e684b180fb 100644 --- a/apps/opencs/view/render/worldspacewidget.hpp +++ b/apps/opencs/view/render/worldspacewidget.hpp @@ -85,6 +85,8 @@ namespace CSVRender virtual void addVisibilitySelectorButtons (CSVWidget::SceneToolToggle *tool); + CSMDoc::Document& getDocument(); + private: void dragEnterEvent(QDragEnterEvent *event);