Cleanup dupes toggle bug
did not revert back to overview when toggling dupe button
/*
* Waltz - Enterprise Architecture
- * Copyright (C) 2016, 2017 Waltz open source project
+ * Copyright (C) 2016, 2017, 2018, 2019 Waltz open source project
* See README.md for more information
*
* This program is free software: you can redistribute it and/or modify
@@ -246,13 +246,13 @@ function controller($q,
});
};
-
vm.onShowMarkAsDuplicate = () => {
- vm.mode = vm.mode === modes.DUPLICATE
- ? vm.onShowOverview()
- : modes.DUPLICATE;
-
+ if (vm.mode !== modes.DUPLICATE) {
loadPotentialMergeTargets();
+ vm.mode = modes.DUPLICATE;
+ } else {
+ vm.onShowOverview();
+ }
};
vm.onSelectMergeTarget = (t) => {
@@ -277,7 +277,6 @@ function controller($q,
};
-
// -- INTERACT: other
vm.onShowOverview = () => {
vm.mergeTarget = null;
