Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -571,8 +571,8 @@ void Application::keyPressEvent(QKeyEvent* event) { · 570 unmodified lines | ||
| 571 | 571 | _myAvatar.getHand().setRaveGloveEffectsMode((QKeyEvent*)event); |
| 572 | 572 | } |
| 573 | 573 | |
| 574 | − bool meta = event->modifiers().testFlag(Qt::MetaModifier); | |
| 575 | − bool shifted = event->modifiers().testFlag(Qt::ShiftModifier); | |
| 574 | + bool isMeta = event->modifiers().testFlag(Qt::MetaModifier); | |
| 575 | + bool isShifted = event->modifiers().testFlag(Qt::ShiftModifier); | |
| 576 | 576 | switch (event->key()) { |
| 577 | 577 | case Qt::Key_BracketLeft: |
| 578 | 578 | _viewFrustumOffsetYaw -= 0.5; |
| @@ -645,9 +645,9 @@ void Application::keyPressEvent(QKeyEvent* event) { · 66 unmodified lines | ||
| 645 | 645 | break; |
| 646 | 646 | |
| 647 | 647 | case Qt::Key_C: |
| 648 | − if (shifted) { | |
| 648 | + if (isShifted) { | |
| 649 | 649 | _occlusionCulling->trigger(); |
| 650 | − } else if (meta) { | |
| 650 | + } else if (isMeta) { | |
| 651 | 651 | chooseVoxelPaintColor(); |
| 652 | 652 | } else { |
| 653 | 653 | _myAvatar.setDriveKeys(DOWN, 1); |
| @@ -659,7 +659,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 5 unmodified lines | ||
| 659 | 659 | break; |
| 660 | 660 | |
| 661 | 661 | case Qt::Key_S: |
| 662 | − if (shifted) { | |
| 662 | + if (isShifted) { | |
| 663 | 663 | doTreeStats(); |
| 664 | 664 | } else { |
| 665 | 665 | _myAvatar.setDriveKeys(BACK, 1); |
| @@ -672,7 +672,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 6 unmodified lines | ||
| 672 | 672 | break; |
| 673 | 673 | |
| 674 | 674 | case Qt::Key_G: |
| 675 | − if (shifted) { | |
| 675 | + if (isShifted) { | |
| 676 | 676 | _gravityUse->trigger(); |
| 677 | 677 | } else { |
| 678 | 678 | _eyedropperMode->trigger(); |
| @@ -680,7 +680,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 1 unmodified line | ||
| 680 | 680 | break; |
| 681 | 681 | |
| 682 | 682 | case Qt::Key_A: |
| 683 | − if (shifted) { | |
| 683 | + if (isShifted) { | |
| 684 | 684 | _renderAtmosphereOn->trigger(); |
| 685 | 685 | } else { |
| 686 | 686 | _myAvatar.setDriveKeys(ROT_LEFT, 1); |
| @@ -700,23 +700,23 @@ void Application::keyPressEvent(QKeyEvent* event) { · 13 unmodified lines | ||
| 700 | 700 | break; |
| 701 | 701 | |
| 702 | 702 | case Qt::Key_Up: |
| 703 | − _myAvatar.setDriveKeys(shifted ? UP : FWD, 1); | |
| 703 | + _myAvatar.setDriveKeys(isShifted ? UP : FWD, 1); | |
| 704 | 704 | break; |
| 705 | 705 | |
| 706 | 706 | case Qt::Key_Down: |
| 707 | − _myAvatar.setDriveKeys(shifted ? DOWN : BACK, 1); | |
| 707 | + _myAvatar.setDriveKeys(isShifted ? DOWN : BACK, 1); | |
| 708 | 708 | break; |
| 709 | 709 | |
| 710 | 710 | case Qt::Key_Left: |
| 711 | − _myAvatar.setDriveKeys(shifted ? LEFT : ROT_LEFT, 1); | |
| 711 | + _myAvatar.setDriveKeys(isShifted ? LEFT : ROT_LEFT, 1); | |
| 712 | 712 | break; |
| 713 | 713 | |
| 714 | 714 | case Qt::Key_Right: |
| 715 | − _myAvatar.setDriveKeys(shifted ? RIGHT : ROT_RIGHT, 1); | |
| 715 | + _myAvatar.setDriveKeys(isShifted ? RIGHT : ROT_RIGHT, 1); | |
| 716 | 716 | break; |
| 717 | 717 | |
| 718 | 718 | case Qt::Key_I: |
| 719 | − if (shifted) { | |
| 719 | + if (isShifted) { | |
| 720 | 720 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 721 | 721 | glm::quat(glm::vec3(0.002f, 0, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 722 | 722 | } else { |
| @@ -726,7 +726,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 726 | 726 | break; |
| 727 | 727 | |
| 728 | 728 | case Qt::Key_K: |
| 729 | − if (shifted) { | |
| 729 | + if (isShifted) { | |
| 730 | 730 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 731 | 731 | glm::quat(glm::vec3(-0.002f, 0, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 732 | 732 | } else { |
| @@ -736,7 +736,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 736 | 736 | break; |
| 737 | 737 | |
| 738 | 738 | case Qt::Key_J: |
| 739 | − if (shifted) { | |
| 739 | + if (isShifted) { | |
| 740 | 740 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 741 | 741 | glm::quat(glm::vec3(0, 0.002f, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 742 | 742 | } else { |
| @@ -746,7 +746,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 746 | 746 | break; |
| 747 | 747 | |
| 748 | 748 | case Qt::Key_M: |
| 749 | − if (shifted) { | |
| 749 | + if (isShifted) { | |
| 750 | 750 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 751 | 751 | glm::quat(glm::vec3(0, -0.002f, 0)) * _myCamera.getEyeOffsetOrientation())); |
| 752 | 752 | } else { |
| @@ -756,7 +756,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 756 | 756 | break; |
| 757 | 757 | |
| 758 | 758 | case Qt::Key_U: |
| 759 | − if (shifted) { | |
| 759 | + if (isShifted) { | |
| 760 | 760 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 761 | 761 | glm::quat(glm::vec3(0, 0, -0.002f)) * _myCamera.getEyeOffsetOrientation())); |
| 762 | 762 | } else { |
| @@ -766,7 +766,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 766 | 766 | break; |
| 767 | 767 | |
| 768 | 768 | case Qt::Key_Y: |
| 769 | − if (shifted) { | |
| 769 | + if (isShifted) { | |
| 770 | 770 | _myCamera.setEyeOffsetOrientation(glm::normalize( |
| 771 | 771 | glm::quat(glm::vec3(0, 0, 0.002f)) * _myCamera.getEyeOffsetOrientation())); |
| 772 | 772 | } else { |
| @@ -781,14 +781,14 @@ void Application::keyPressEvent(QKeyEvent* event) { · 8 unmodified lines | ||
| 781 | 781 | _lookingInMirror->trigger(); |
| 782 | 782 | break; |
| 783 | 783 | case Qt::Key_F: |
| 784 | − if (shifted) { | |
| 784 | + if (isShifted) { | |
| 785 | 785 | _frustumOn->trigger(); |
| 786 | 786 | } else { |
| 787 | 787 | _fullScreenMode->trigger(); |
| 788 | 788 | } |
| 789 | 789 | break; |
| 790 | 790 | case Qt::Key_V: |
| 791 | − if (shifted) { | |
| 791 | + if (isShifted) { | |
| 792 | 792 | _renderVoxels->trigger(); |
| 793 | 793 | } else { |
| 794 | 794 | _addVoxelMode->trigger(); |
| @@ -798,7 +798,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 798 | 798 | _manualFirstPerson->trigger(); |
| 799 | 799 | break; |
| 800 | 800 | case Qt::Key_R: |
| 801 | − if (shifted) { | |
| 801 | + if (isShifted) { | |
| 802 | 802 | _frustumRenderModeAction->trigger(); |
| 803 | 803 | } else { |
| 804 | 804 | _deleteVoxelMode->trigger(); |
| @@ -808,7 +808,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines | ||
| 808 | 808 | _colorVoxelMode->trigger(); |
| 809 | 809 | break; |
| 810 | 810 | case Qt::Key_O: |
| 811 | − if (shifted) { | |
| 811 | + if (isShifted) { | |
| 812 | 812 | _viewFrustumFromOffset->trigger(); |
| 813 | 813 | } else { |
| 814 | 814 | _selectVoxelMode->trigger(); |