| 1915 | |
| 1916 | |
| 1917 | bool ScriptModulationMatrix::MatrixUndoAction::perform() |
| 1918 | { |
| 1919 | if (matrix == nullptr) |
| 1920 | return false; |
| 1921 | |
| 1922 | switch (type) |
| 1923 | { |
| 1924 | case ActionType::Clear: |
| 1925 | matrix->clearConnectionsInternal(); |
| 1926 | break; |
| 1927 | case ActionType::Add: |
| 1928 | return matrix->connectInternal(source, target, true); |
| 1929 | case ActionType::Remove: |
| 1930 | return matrix->connectInternal(source, target, false); |
| 1931 | case ActionType::Intensity: |
| 1932 | return matrix->updateIntensityInternal(source, target, newValue); |
| 1933 | case ActionType::ValueMode: |
| 1934 | return matrix->updateValueModeInternal(source, target, newValue); |
| 1935 | case ActionType::Update: |
| 1936 | matrix->updateConnectionDataInternal(newValue); |
| 1937 | return true; |
| 1938 | default: |
| 1939 | break; |
| 1940 | } |
| 1941 | |
| 1942 | return true; |
| 1943 | } |
| 1944 | |
| 1945 | bool ScriptModulationMatrix::MatrixUndoAction::undo() |
| 1946 | { |
no test coverage detected