diff --git a/apps/opencs/view/filter/filterbox.cpp b/apps/opencs/view/filter/filterbox.cpp index e1fb0c616..b191c065f 100644 --- a/apps/opencs/view/filter/filterbox.cpp +++ b/apps/opencs/view/filter/filterbox.cpp @@ -6,6 +6,8 @@ #include "recordfilterbox.hpp" +#include + CSVFilter::FilterBox::FilterBox (CSMWorld::Data& data, QWidget *parent) : QWidget (parent) { @@ -28,7 +30,18 @@ CSVFilter::FilterBox::FilterBox (CSMWorld::Data& data, QWidget *parent) void CSVFilter::FilterBox::dropEvent (QDropEvent* event) { + const CSMWorld::TableMimeData* mime = dynamic_cast (event->mimeData()); + std::vector records = mime->getData(); + + std::vector types; + + for (std::vector::iterator it = records.begin(); it != records.end(); ++it) + { + types.push_back(it->getType()); + } + + emit recordDropped(types); } void CSVFilter::FilterBox::dragEnterEvent (QDragEnterEvent* event) diff --git a/apps/opencs/view/filter/filterbox.hpp b/apps/opencs/view/filter/filterbox.hpp index 6268643f3..a96e7203e 100644 --- a/apps/opencs/view/filter/filterbox.hpp +++ b/apps/opencs/view/filter/filterbox.hpp @@ -1,9 +1,12 @@ #ifndef CSV_FILTER_FILTERBOX_H #define CSV_FILTER_FILTERBOX_H +#include + #include #include "../../model/filter/node.hpp" +#include "../../model/world/universalid.hpp" namespace CSMWorld { @@ -29,6 +32,7 @@ namespace CSVFilter signals: void recordFilterChanged (boost::shared_ptr filter); + void recordDropped (const std::vector& types); }; }