X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxGEditorTabPanel.cxx;h=ab5c55fba7f909daa7f178dd16653fc291b78d42;hb=04884fa171fe877e5c2ca53d11d6838bc1f8a8f7;hp=6225ee313d1a0691c4c966387d9285c229ee11e7;hpb=0846876a83badbcceaa83f3e1562ef1708e0d7e0;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index 6225ee3..ab5c55f 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -221,7 +221,30 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n"); } //========================================================================= - unsigned short wxGEditorTabPanel::loadTempDiagram(unsigned short un) //FCY + unsigned short wxGEditorTabPanel::getUndoState() + { + if(states.size()>0) + { + if(_actualdo == states.begin() ) + return 0; + else + return 1; + } + } + + unsigned short wxGEditorTabPanel::getRedoState() + { + if(states.size()>0) + { + if(_actualdo == --states.end() || states.size() == 1) + return 0; + else + return 1; + } + } + + //========================================================================= + void wxGEditorTabPanel::loadTempDiagram(unsigned short un) //FCY { unsigned short res = 1; deleteAllBoxes(); @@ -255,7 +278,7 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n"); } } _sceneManager->loadDiagram(ss); - return res; + } //=========================================================================