| 1943 | } |
| 1944 | |
| 1945 | bool ScriptModulationMatrix::MatrixUndoAction::undo() |
| 1946 | { |
| 1947 | if (matrix == nullptr) |
| 1948 | return false; |
| 1949 | |
| 1950 | switch (type) |
| 1951 | { |
| 1952 | case ActionType::Clear: |
| 1953 | case ActionType::Update: |
| 1954 | matrix->fromBase64(oldValue.toString()); |
| 1955 | break; |
| 1956 | case ActionType::Add: |
| 1957 | return matrix->connectInternal(source, target, false); |
| 1958 | case ActionType::Remove: |
| 1959 | return matrix->connectInternal(source, target, true); |
| 1960 | case ActionType::Intensity: |
| 1961 | return matrix->updateIntensityInternal(source, target, oldValue); |
| 1962 | case ActionType::ValueMode: |
| 1963 | return matrix->updateValueModeInternal(source, target, oldValue); |
| 1964 | default: |
| 1965 | break; |
| 1966 | } |
| 1967 | |
| 1968 | return true; |
| 1969 | } |
| 1970 | |
| 1971 | } |
| 1972 |
nothing calls this directly
no test coverage detected