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);
}
Application::~Application(){
setState(0);
ofRemoveListener(ofEvents().keyPressed, this, &Application::onKeyPressed);
}
void Application::setup(){
if(!loadXmlSettings(PIMAPPER_USER_SURFACES_XML_FILE)){
ofLogWarning("Application::setup()") << "Failed to load user settings" << endl;

1
src/Application/Application.h

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

Loading…
Cancel
Save