| 227 | } |
| 228 | |
| 229 | Uint32 UITreeViewFS::onMessage( const NodeMessage* msg ) { |
| 230 | if ( msg->getMsg() == NodeMessage::Drop ) { |
| 231 | const NodeDropMessage* dropMsg = static_cast<const NodeDropMessage*>( msg ); |
| 232 | static constexpr auto expectedType = |
| 233 | static_cast<Uint32>( CustomWidgets::UI_TYPE_TREEVIEWCELLFS ); |
| 234 | if ( dropMsg->getSender()->isType( expectedType ) && |
| 235 | dropMsg->getDroppedNode()->isType( expectedType ) ) { |
| 236 | auto dst = dropMsg->getSender()->asType<UITreeViewCellFS>()->getCurrentPath(); |
| 237 | moveFiles( mSrcDragMultiplePaths, dst ); |
| 238 | return 1; |
| 239 | } |
| 240 | } |
| 241 | return UITreeView::onMessage( msg ); |
| 242 | } |
| 243 | |
| 244 | void UITreeViewFS::moveFiles( const std::vector<std::string>& paths, const std::string& dstDir ) { |
| 245 | if ( paths.empty() ) |
nothing calls this directly
no test coverage detected