remove [ camera key, allow F to enter camera without selection

This commit is contained in:
David Back 2018-08-29 11:56:37 -07:00
parent 511478a563
commit dcf2074d7e
2 changed files with 2 additions and 13 deletions

View file

@ -304,8 +304,6 @@ controller::Input::NamedVector KeyboardMouseDevice::InputDevice::getAvailableInp
availableInputs.append(Input::NamedPair(makeInput(Qt::Key_Control), "Control"));
availableInputs.append(Input::NamedPair(makeInput(Qt::Key_Delete), "Delete"));
availableInputs.append(Input::NamedPair(makeInput(Qt::Key_Backspace), QKeySequence(Qt::Key_Backspace).toString()));
availableInputs.append(Input::NamedPair(makeInput(Qt::Key_BracketLeft), "BracketLeft"));
availableInputs.append(Input::NamedPair(makeInput(Qt::Key_BracketRight), "BracketRight"));
availableInputs.append(Input::NamedPair(makeInput(Qt::LeftButton), "LeftMouseButton"));
availableInputs.append(Input::NamedPair(makeInput(Qt::MiddleButton), "MiddleMouseButton"));

View file

@ -1890,18 +1890,10 @@ function toggleKey(value) {
}
}
function focusKey(value) {
if (value === 0) { // on release
if (selectionManager.hasSelection()) {
cameraManager.enable();
cameraManager.focus(selectionManager.worldPosition,
selectionManager.worldDimensions,
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
}
}
}
function cameraKey(value) {
if (value === 0) { // on release
cameraManager.enable();
cameraManager.focus(selectionManager.worldPosition, selectionManager.worldDimensions,
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
}
}
function gridKey(value) {
@ -1917,7 +1909,6 @@ mapping.from([Controller.Hardware.Keyboard.Backspace]).when([Controller.Hardware
mapping.from([Controller.Hardware.Keyboard.D]).when([Controller.Hardware.Keyboard.Control]).to(deselectKey);
mapping.from([Controller.Hardware.Keyboard.T]).to(toggleKey);
mapping.from([Controller.Hardware.Keyboard.F]).to(focusKey);
mapping.from([Controller.Hardware.Keyboard.BracketLeft]).to(cameraKey);
mapping.from([Controller.Hardware.Keyboard.G]).to(gridKey);
function recursiveAdd(newParentID, parentData) {