X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxContourViewPanel.cxx;h=00465c1ea5afed17d733f95847d5e57e615bcbc1;hb=378b0eb29f4ed8dc8e64726b326a9781f92f9295;hp=8d271f898c35797f8139a6400162cc53916e4137;hpb=b935f54c82b090852001860eb12f5433779c22c4;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx index 8d271f8..00465c1 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx @@ -8,7 +8,7 @@ //---------------------------------------------------------------------------------------------------------------- // Other includes //---------------------------------------------------------------------------------------------------------------- -#include "ConceptDataWrap.h" +//#include "ConceptDataWrap.h" //this should be eliminated at some point //#include "wxContourEventHandler.h" @@ -137,7 +137,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE ) Connect(_verticalBar->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onMovedBar_Vertical ); - SetSizer( outSizer ); + this->SetSizer( outSizer ); this->SetAutoLayout( true ); this->Layout(); @@ -691,6 +691,42 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE ) setActualVertical( (int)val ); } void wxContourViewPanel::onActionButtonPressed(wxCommandEvent& event){ + + + std::vector currentSelection = _sceneManager->getSelectedObjects(); + int elementsSelected = currentSelection.size(); + bool ctrlKey = _sceneManager->isCtrlPressed(); + char toolCommand = _sceneManager->getLastKeyCode(); + + + if ( toolCommand == 3 && ctrlKey ) //'C' || 'c' + { + wxContourMainFrame::getInstance()->onCopy(); + } + else if( toolCommand == 22 && ctrlKey ) //'V' || 'v' + { + wxContourMainFrame::getInstance()->onPaste(); + } + else if( toolCommand == 8 || (toolCommand==127) ) // backspace Delete + { + wxContourMainFrame::getInstance()->onDeleteContour(); + } + else if( toolCommand == 14 && ctrlKey ) //'N' || 'n' + { + //toolCommand = &(CREATE_CONTOUR_KEY); + } + else if( toolCommand == 15 && ctrlKey ) //'O' || 'o' + { + wxContourMainFrame::getInstance()->onLoad(); + } + else if( toolCommand == 19 && ctrlKey ) //'S' || 's' + { + wxContourMainFrame::getInstance()->saveFileWithContoursAutomatique(); + }else if( toolCommand == 26 ){ + wxContourMainFrame::getInstance()->onUndo(); + }else if( toolCommand == 25 ){ + wxContourMainFrame::getInstance()->onRedo(); + } } void wxContourViewPanel::removeSceneContours(){