Prevent track-changes hotkey actions when not enabled.

This commit is contained in:
Shane Kilkelly 2017-08-03 15:17:28 +01:00
parent 670d4438dc
commit 9cc461605e
2 changed files with 6 additions and 0 deletions

View file

@ -90,6 +90,8 @@ define [
$scope.chat = {}
ide.toggleReviewPanel = $scope.toggleReviewPanel = () ->
if !$scope.project.features.trackChangesVisible
return
$scope.ui.reviewPanelOpen = !$scope.ui.reviewPanelOpen
event_tracking.sendMB "rp-toggle-panel", { value : $scope.ui.reviewPanelOpen }

View file

@ -416,6 +416,8 @@ define [
$scope.toggleReviewPanel()
$scope.addNewCommentFromKbdShortcut = () ->
if !$scope.project.features.trackChangesVisible
return
$scope.$broadcast "comment:select_line"
if !$scope.ui.reviewPanelOpen
$scope.toggleReviewPanel()
@ -575,6 +577,8 @@ define [
$scope.openTrackChangesUpgradeModal()
$scope.toggleTrackChangesFromKbdShortcut = () ->
if !$scope.project.features.trackChangesVisible
return
if $scope.editor.wantTrackChanges
$scope.toggleTrackChanges false
else