From: cervenansky <> Date: Wed, 23 May 2012 10:54:03 +0000 (+0000) Subject: Bug #1362, Bug #1361 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a9060eb4ac36b5ad914a88ef59d75710ca26b2d2;p=bbtkGEditor.git Bug #1362, Bug #1361 --- diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx index bdec8ae..8c73675 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx @@ -75,6 +75,7 @@ namespace bbtk { _view->setState(HIGHLIGHTED); } + return true; // to avoid to redraw all if nothing } // state if( state==HIGHLIGHTED) diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx index 0eec429..97c2605 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx @@ -193,10 +193,12 @@ namespace bbtk vtkTextProperty *prop = vtkTextProperty::New(); prop->BoldOn(); prop->SetFontFamilyToArial(); - prop->SetFontSize(100); + _boxTextActor->GetTextProperty()->BoldOn(); + prop->SetFontSize(80); _boxTextActor->SetTextProperty(prop); - //_boxTextActor->GetTextProperty()->SetFontSize(80); - //_boxTextActor->GetTextProperty()->BoldOn(); + + // _boxTextActor->GetTextProperty()->SetFontSize(80); + //------------ @@ -207,9 +209,10 @@ namespace bbtk void vtkGBlackBoxView::addVtkActors()//virtual { + _baseView->GetRenderer()->AddActor(_borderObjectActor); - _baseView->GetRenderer()->AddActor(_boxTextActor); vtkGObjectView::addVtkActors(); + _baseView->GetRenderer()->AddActor(_boxTextActor); } //========================================================================= @@ -229,7 +232,7 @@ namespace bbtk temp+=":"; temp+=_model->getBBTKName(); _boxTextActor->SetInput(temp.c_str()); - _boxTextActor->SetPosition(xInic+4,yInic-7,zInic); + _boxTextActor->SetPosition(xInic+4,yInic-7,zInic+1); _boxTextActor->SetScale(0.05,0.05,1); } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index 94d6e54..209007f 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -767,9 +767,10 @@ void wxGUIEditorGraphicBBS::OnOpenDiagram(wxCommandEvent& event) { wxString fileName = openFileDialog->GetPath(); ifstream inputStream; std::string fName = (const char*) (fileName.mb_str()); + inputStream.open(fName.c_str()); + assert(inputStream.good()); // fails _tabsMgr->addNewTab(openFileDialog->GetFilename()); - _tabsMgr->loadDiagram(inputStream, fName); inputStream.close(); diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index bd32772..6225ee3 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -216,7 +216,7 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n"); { this->SetFullPath(path); stringstream ss; - ss << inputStream ; + ss << inputStream.rdbuf() ; _sceneManager->loadDiagram(ss); } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h index 7a6b39f..d305732 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h @@ -57,7 +57,7 @@ Version: $Revision$ #include //Includes std -#include +#include namespace bbtk {