Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -835,6 +835,8 @@ void Application::mouseMoveEvent(QMouseEvent* event) { · 834 unmodified lines | ||
| 835 | 835 | deleteVoxelUnderCursor(); |
| 836 | 836 | } |
| 837 | 837 | } |
| 838 | + | |
| 839 | + _pieMenu.mouseMoveEvent(_mouseX, _mouseY); | |
| 838 | 840 | } |
| 839 | 841 | } |
| 840 | 842 | |
| @@ -847,7 +849,10 @@ void Application::mousePressEvent(QMouseEvent* event) { · 6 unmodified lines | ||
| 847 | 849 | _mouseDragStartedY = _mouseY; |
| 848 | 850 | _mouseVoxelDragging = _mouseVoxel; |
| 849 | 851 | _mousePressed = true; |
| 850 | − maybeEditVoxelUnderCursor(); | |
| 852 | + | |
| 853 | + if (!maybeEditVoxelUnderCursor()) { | |
| 854 | + _pieMenu.mousePressEvent(_mouseX, _mouseY); | |
| 855 | + } | |
| 851 | 856 | |
| 852 | 857 | } else if (event->button() == Qt::RightButton && checkedVoxelModeAction() != 0) { |
| 853 | 858 | deleteVoxelUnderCursor(); |
| @@ -862,6 +867,8 @@ void Application::mouseReleaseEvent(QMouseEvent* event) { · 8 unmodified lines | ||
| 862 | 867 | _mouseY = event->y(); |
| 863 | 868 | _mousePressed = false; |
| 864 | 869 | checkBandwidthMeterClick(); |
| 870 | + | |
| 871 | + _pieMenu.mouseReleaseEvent(_mouseX, _mouseY); | |
| 865 | 872 | } |
| 866 | 873 | } |
| 867 | 874 | } |
| @@ -2740,6 +2747,10 @@ void Application::displayOverlay() { · 1872 unmodified lines | ||
| 2740 | 2747 | _swatch.checkColor(); |
| 2741 | 2748 | } |
| 2742 | 2749 | |
| 2750 | + if (_pieMenu.isDisplayed()) { | |
| 2751 | + _pieMenu.render(); | |
| 2752 | + } | |
| 2753 | + | |
| 2743 | 2754 | glPopMatrix(); |
| 2744 | 2755 | } |
| 2745 | 2756 | |
| @@ -3147,7 +3158,7 @@ void Application::shiftPaintingColor() { · 401 unmodified lines | ||
| 3147 | 3158 | } |
| 3148 | 3159 | |
| 3149 | 3160 | |
| 3150 | −void Application::maybeEditVoxelUnderCursor() { | |
| 3161 | +bool Application::maybeEditVoxelUnderCursor() { | |
| 3151 | 3162 | if (_addVoxelMode->isChecked() || _colorVoxelMode->isChecked()) { |
| 3152 | 3163 | if (_mouseVoxel.s != 0) { |
| 3153 | 3164 | PACKET_TYPE message = (_destructiveAddVoxel->isChecked() ? |
| @@ -3218,7 +3229,11 @@ void Application::maybeEditVoxelUnderCursor() { · 64 unmodified lines | ||
| 3218 | 3229 | deleteVoxelUnderCursor(); |
| 3219 | 3230 | } else if (_eyedropperMode->isChecked()) { |
| 3220 | 3231 | eyedropperVoxelUnderCursor(); |
| 3232 | + } else { | |
| 3233 | + return false; | |
| 3221 | 3234 | } |
| 3235 | + | |
| 3236 | + return true; | |
| 3222 | 3237 | } |
| 3223 | 3238 | |
| 3224 | 3239 | void Application::deleteVoxelUnderCursor() { |