From 3b202bd2706473f8dd6a33a322af9721a4b60c71 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Thu, 22 Sep 2016 21:33:39 +0200 Subject: [PATCH] Remove TextureEditor::enable() disable() etc... --- src/Surfaces/SurfaceManagerGui.cpp | 3 --- src/UserInterface/TextureEditor.cpp | 21 --------------------- src/UserInterface/TextureEditor.h | 5 ----- 3 files changed, 29 deletions(-) diff --git a/src/Surfaces/SurfaceManagerGui.cpp b/src/Surfaces/SurfaceManagerGui.cpp index 8c065e1..9676eb3 100644 --- a/src/Surfaces/SurfaceManagerGui.cpp +++ b/src/Surfaces/SurfaceManagerGui.cpp @@ -64,10 +64,7 @@ void SurfaceManagerGui::setMode(int newGuiMode){ } if(guiMode == GuiMode::TEXTURE_MAPPING){ - textureEditor.enable(); textureEditor.setSurface(surfaceManager->getSelectedSurface()); - }else{ - textureEditor.disable(); } if(guiMode == GuiMode::PROJECTION_MAPPING){ diff --git a/src/UserInterface/TextureEditor.cpp b/src/UserInterface/TextureEditor.cpp index ae9b968..3838aa4 100644 --- a/src/UserInterface/TextureEditor.cpp +++ b/src/UserInterface/TextureEditor.cpp @@ -5,31 +5,10 @@ namespace piMapper { TextureEditor::TextureEditor(){ clear(); - enable(); } TextureEditor::~TextureEditor(){ clear(); - disable(); -} - -void TextureEditor::registerKeyEvents(){ - //ofAddListener(ofEvents().keyPressed, this, &TextureEditor::keyPressed); - //ofAddListener(ofEvents().keyReleased, this, &TextureEditor::keyReleased); -} - -void TextureEditor::unregisterKeyEvents(){ - //ofRemoveListener(ofEvents().keyPressed, this, &TextureEditor::keyPressed); - //ofRemoveListener(ofEvents().keyReleased, this, &TextureEditor::keyReleased); -} - -void TextureEditor::enable(){ - registerKeyEvents(); - bShiftKeyDown = false; -} - -void TextureEditor::disable(){ - unregisterKeyEvents(); } void TextureEditor::update(){ diff --git a/src/UserInterface/TextureEditor.h b/src/UserInterface/TextureEditor.h index 41bbfd3..bb32f7e 100644 --- a/src/UserInterface/TextureEditor.h +++ b/src/UserInterface/TextureEditor.h @@ -16,11 +16,6 @@ class TextureEditor { TextureEditor(); ~TextureEditor(); - void registerKeyEvents(); - void unregisterKeyEvents(); - void enable(); - void disable(); - void update(); // Maybe the Application pointer would make sense there. Not sure yet. void keyPressed(ofKeyEventArgs & args); void keyReleased(ofKeyEventArgs & args);