Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHIFT + Right click bug preventing clip/transition movement #4119

Merged
merged 4 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dist
openshot_qt.egg-info

protobuf_data/
openshot_qt/
19 changes: 0 additions & 19 deletions src/timeline/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,6 @@ $(document).ready(function () {
$(".playhead-line").height(body_object.scope().playhead_height);
});

// Bind to keydown event (to detect SHIFT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job removing all this code!

body_object.keydown(function (event) {
if (event.which === 16) {
if (timeline) {
timeline.qt_log("DEBUG", "Shift pressed!");
}
body_object.scope().shift_pressed = true;
}
});

body_object.keyup(function (event) {
if (event.which === 16) {
if (timeline) {
timeline.qt_log("DEBUG", "Shift released!");
}
body_object.scope().shift_pressed = false;
}
});

// Manually trigger the window resize code (to verify it runs at least once)
$(window).trigger("resize");
});
1 change: 0 additions & 1 deletion src/timeline/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ App.controller("TimelineCtrl", function ($scope) {
$scope.playhead_animating = false;
$scope.playhead_height = 300;
$scope.playheadTime = secondsToTime($scope.project.playhead_position, $scope.project.fps.num, $scope.project.fps.den);
$scope.shift_pressed = false;
$scope.snapline_position = 0.0;
$scope.snapline = false;
$scope.enable_snapping = true;
Expand Down
2 changes: 1 addition & 1 deletion src/timeline/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function moveBoundingBox(scope, previous_x, previous_y, x_offset, y_offset, left
snapping_result.top = top;

// Check for shift key
if (scope.shift_pressed) {
if (event.shiftKey) {
// freeze X movement
x_offset = 0;
snapping_result.left = previous_x;
Expand Down