Browse Source

Adapt to new `GridWarpSurface` related interface

Additionally remove destructors as they caused SIGABRT errors when shutting down the application
master
Krisjanis Rijnieks 9 years ago
parent
commit
dd508088e8
  1. 5
      src/Application/Application.cpp
  2. 1
      src/Application/Application.h
  3. 12
      src/Application/ProjectionMappingState.cpp

5
src/Application/Application.cpp

@ -14,11 +14,6 @@ Application::Application(){
ofAddListener(ofEvents().keyPressed, this, &Application::onKeyPressed); ofAddListener(ofEvents().keyPressed, this, &Application::onKeyPressed);
} }
Application::~Application(){
setState(0);
ofRemoveListener(ofEvents().keyPressed, this, &Application::onKeyPressed);
}
void Application::setup(){ void Application::setup(){
if(!loadXmlSettings(PIMAPPER_USER_SURFACES_XML_FILE)){ if(!loadXmlSettings(PIMAPPER_USER_SURFACES_XML_FILE)){
ofLogWarning("Application::setup()") << "Failed to load user settings" << endl; ofLogWarning("Application::setup()") << "Failed to load user settings" << endl;

1
src/Application/Application.h

@ -30,7 +30,6 @@ class Application {
public: public:
Application(); Application();
~Application();
ApplicationBaseState * getState(); ApplicationBaseState * getState();

12
src/Application/ProjectionMappingState.cpp

@ -73,8 +73,7 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
// TODO: The command should not require projection editor pointer // TODO: The command should not require projection editor pointer
app->getCmdManager()->exec( app->getCmdManager()->exec(
new AddGridRowCmd( new AddGridRowCmd(
(GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface() ));
app->getGui()->getProjectionEditor() ));
} }
} }
break; break;
@ -88,8 +87,7 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
// TODO: The command should not require projection editor pointer // TODO: The command should not require projection editor pointer
app->getCmdManager()->exec( app->getCmdManager()->exec(
new RmGridRowCmd( new RmGridRowCmd(
(GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface() ));
app->getGui()->getProjectionEditor() ));
} }
} }
} }
@ -103,8 +101,7 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
// TODO: The command should not require projection editor pointer // TODO: The command should not require projection editor pointer
app->getCmdManager()->exec( app->getCmdManager()->exec(
new AddGridColCmd( new AddGridColCmd(
(GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface() ));
app->getGui()->getProjectionEditor() ));
} }
} }
break; break;
@ -118,8 +115,7 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
// TODO: The command should not require projection editor pointer // TODO: The command should not require projection editor pointer
app->getCmdManager()->exec( app->getCmdManager()->exec(
new RmGridColCmd( new RmGridColCmd(
(GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface() ));
app->getGui()->getProjectionEditor() ));
} }
} }
} }

Loading…
Cancel
Save