5 changed files with 558 additions and 558 deletions
File diff suppressed because it is too large
@ -1,23 +1,23 @@ |
|||||
#include "SetActivePresetCmd.h" |
#include "SetPresetCmd.h" |
||||
|
|
||||
namespace ofx { |
namespace ofx { |
||||
namespace piMapper { |
namespace piMapper { |
||||
|
|
||||
SetActivePresetCmd::SetActivePresetCmd(Application * app, unsigned int pi){ |
SetPresetCmd::SetPresetCmd(Application * app, unsigned int pi){ |
||||
_app = app; |
_app = app; |
||||
_newPresetIndex = pi; |
_newPresetIndex = pi; |
||||
} |
} |
||||
|
|
||||
void SetActivePresetCmd::exec(){ |
void SetPresetCmd::exec(){ |
||||
ofLogNotice("SetActivePresetCmd", "exec"); |
ofLogNotice("SetPresetCmd", "exec"); |
||||
_prevPresetIndex = _app->getSurfaceManager()->getActivePresetIndex(); |
_prevPresetIndex = _app->getSurfaceManager()->getActivePresetIndex(); |
||||
_app->getSurfaceManager()->deselectSurface(); |
_app->getSurfaceManager()->deselectSurface(); |
||||
_selectedSurfaceIndex = _app->getSurfaceManager()->getSelectedSurfaceIndex(); |
_selectedSurfaceIndex = _app->getSurfaceManager()->getSelectedSurfaceIndex(); |
||||
_app->getSurfaceManager()->setPreset(_newPresetIndex); |
_app->getSurfaceManager()->setPreset(_newPresetIndex); |
||||
} |
} |
||||
|
|
||||
void SetActivePresetCmd::undo(){ |
void SetPresetCmd::undo(){ |
||||
ofLogNotice("SetActivePresetCmd", "undo"); |
ofLogNotice("SetPresetCmd", "undo"); |
||||
_app->getSurfaceManager()->setPreset(_prevPresetIndex); |
_app->getSurfaceManager()->setPreset(_prevPresetIndex); |
||||
_app->getSurfaceManager()->selectSurface(_selectedSurfaceIndex); |
_app->getSurfaceManager()->selectSurface(_selectedSurfaceIndex); |
||||
} |
} |
Loading…
Reference in new issue