X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxGEditorTabPanel.cxx;h=030e52aeca52c607b13bbca5e86828f410036150;hb=b7e481b5969501d55054998e3115cddd2d6ed918;hp=a10d7bc2786dd1ac1a33489c68b30bff44309c2d;hpb=dac242863581e890b01c581127473ad267f46073;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index a10d7bc..030e52a 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -130,8 +130,12 @@ namespace bbtk * For a drag and drop tutorial read: * http://zetcode.com/gui/wxwidgets/dragdrop/ */ + + //wxMessageBox(data); + std::string stdData = crea::wx2std(data); - //std::cout << "Text drop: " << stdData << std::endl; + + //std::cout << "Text drop: '" << stdData << "'" << std::endl; if(stdData.substr(0,4) == "box:") { @@ -140,7 +144,7 @@ namespace bbtk posT = stdData.find_first_not_of(':', posT); std::string boxType = stdData.substr(posT); - std::cout << "box: Package='" << packageName << "' BoxType='" << boxType << "'" <_panelsManager->GetParentGUIEditorGraphicBBS()->OpenBBS(filepath, filename); + } + else if(filetype == "bbg") + { + std::cout << "Opening bbg file." << std::endl; + this->_panelsManager->GetParentGUIEditorGraphicBBS()->OpenDiagram(filepath, filename); + } + else + { + std::cout << "Unknown file type: Can't open this kind of file: " << filetype << std::endl; + } + } + else + { + std::cout << "File Doesn't Exists. The given path is invalid: " << filePath << std::endl; + } + std::getline(ss, stdData, (char)13); + } } return true;