X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FbbtkwxGUIEditorGraphicBBS.cxx;fp=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FbbtkwxGUIEditorGraphicBBS.cxx;h=aca52c92a5597683910234a40a13c550c37bebd9;hb=d48bd5af65756f8d826169d9d975ac29a042984c;hp=4b9c0e5f0abcaefa0877995d2aff861386b46297;hpb=b7a2b34294c468696201b94c7020563e70440a80;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index 4b9c0e5..aca52c9 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -139,7 +139,9 @@ void wxGUIEditorGraphicBBS::initToolbar() wxBitmap bmp_redo(redo_xpm); wxBitmap bmp_editProperties(editProperties_xpm); wxBitmap bmp_showTree(showTree_xpm); - wxToolBar *toolbar = new wxToolBar(this, wxID_ANY); + +// wxToolBar *toolbar = new wxToolBar(this, wxID_ANY); + wxToolBar *toolbar = CreateToolBar(); //Adds a tool btn to the toolbar toolbar->AddTool(ID_NEW, _T("New"), bmp_new, wxNullBitmap, wxITEM_NORMAL, @@ -1550,24 +1552,41 @@ bool wxGUIEditorGraphicBBS::TryToOpenScriptComplexBox(std::string packageName ,s //========================================================================= bool wxGUIEditorGraphicBBS::TryToOpenScript(std::string packageName ,std::string boxType,bool scriptApplication, bool scriptComplexBox) { + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript Start\n "); Package::Pointer k; std::map< std::string, BlackBoxDescriptor::Pointer> mapDesc; BlackBoxDescriptor::Pointer descriptor; + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 1\n "); k = GetBBTKFactory()->GetPackage(packageName); + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 2\n "); mapDesc = k->GetDescriptorMap(); + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 3\n "); descriptor = mapDesc[boxType]; + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 3.1 packageName:%s boxType:%s \n",packageName.c_str(), boxType.c_str() ); + + if (descriptor==NULL) printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 3.2\n AUUCHH "); + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 3.2\n "); bool result=false; - - if ( - ((descriptor->IsTypeOfScript_Application()==true) && (scriptApplication==true)) - || - ((descriptor->IsTypeOfScript_ComplexBox()==true) && (scriptComplexBox==true)) - ) +descriptor->IsTypeOfScript_Application(); + if (descriptor!=NULL) { - result=true; - OpenScript(descriptor->GetScriptFileName(),boxType); - } + if ( + ((descriptor->IsTypeOfScript_Application()==true) && (scriptApplication==true)) + || + ((descriptor->IsTypeOfScript_ComplexBox()==true) && (scriptComplexBox==true)) + ) + { + result=true; + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 4\n "); + OpenScript(descriptor->GetScriptFileName(),boxType); + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript 5\n "); + } // if descriptor Type + } else { + printf("EED ERROR wxGUIEditorGraphicBBS::TryToOpenScript >> The descriptor of this box not exists (packageName:%s boxType:%s) this is not normal\n",packageName.c_str(), boxType.c_str() ); + } // if descriptor NULL + + printf("EED wxGUIEditorGraphicBBS::TryToOpenScript END\n "); return result; }