Update 'f' focus to only work when something is selected

This commit is contained in:
Ryan Huffman 2014-12-12 15:26:07 -08:00
parent 1ea25db237
commit b8737ad525

View file

@ -839,9 +839,11 @@ Controller.keyReleaseEvent.connect(function (event) {
selectionDisplay.toggleSpaceMode();
} else if (event.text == "f") {
if (isActive) {
cameraManager.focus(selectionManager.worldPosition,
selectionManager.worldDimensions,
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
if (selectionManager.hasSelection()) {
cameraManager.focus(selectionManager.worldPosition,
selectionManager.worldDimensions,
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
}
}
} else if (event.text == '[') {
if (isActive) {