]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
Bug #1688 RaC 2012 Bug to avoid opening twice the same diagram. Corrected and tested.
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxTabPanelsManager.cxx
index 7c29eaefb1e94f887567146803e76d81cec6c4ba..fe453d791a001df2bc4b3f8fa63364a276387727 100644 (file)
@@ -305,6 +305,20 @@ printf("wxTabPanelsManager::VerifyActualTabPanel  %d \n", this->_notebook->GetPa
            //return ( (wxGEditorTabPanel) _notebook->GetPage(id)->GetFullPath( ) );
        }
 
+       //=========================================================================
+
+       int  wxTabPanelsManager::FindTab(std::string filename)
+       {
+               std::map<int, wxGEditorTabPanel*>::iterator it;
+               for (it = _panels.begin(); it != _panels.end(); ++it)
+               {
+                       wxGEditorTabPanel *obj = it->second;
+                       int id = it->first;
+                       if(obj->GetFullPath()==filename)
+                               return id;
+               }
+               return -1;
+       }
 
        //=========================================================================
     std::string wxTabPanelsManager::GetCbPackageName()