Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all
Unified · Split
| @@ -67,7 +67,6 @@ · 66 unmodified lines | ||
| 67 | 67 | #include <UUID.h> |
| 68 | 68 | |
| 69 | 69 | #include "Application.h" |
| 70 | −#include "HFActionEvent.h" | |
| 71 | 70 | #include "InterfaceVersion.h" |
| 72 | 71 | #include "Menu.h" |
| 73 | 72 | #include "ModelUploader.h" |
| @@ -78,6 +77,8 @@ · 4 unmodified lines | ||
| 78 | 77 | #include "devices/OculusManager.h" |
| 79 | 78 | #include "devices/TV3DManager.h" |
| 80 | 79 | |
| 80 | +#include "events/HFActionEvent.h" | |
| 81 | + | |
| 81 | 82 | #include "renderer/ProgramObject.h" |
| 82 | 83 | |
| 83 | 84 | #include "scripting/AccountScriptingInterface.h" |
| @@ -139,6 +140,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 55 unmodified lines | ||
| 139 | 140 | _glWidget(new GLCanvas()), |
| 140 | 141 | _nodeThread(new QThread(this)), |
| 141 | 142 | _datagramProcessor(), |
| 143 | + _undoStack(), | |
| 144 | + _undoStackScriptingInterface(&_undoStack), | |
| 142 | 145 | _frameCount(0), |
| 143 | 146 | _fps(60.0f), |
| 144 | 147 | _justStarted(true), |
| @@ -175,8 +178,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 30 unmodified lines | ||
| 175 | 178 | _nodeBoundsDisplay(this), |
| 176 | 179 | _previousScriptLocation(), |
| 177 | 180 | _applicationOverlay(), |
| 178 | − _undoStack(), | |
| 179 | − _undoStackScriptingInterface(&_undoStack), | |
| 180 | 181 | _runningScriptsWidget(NULL), |
| 181 | 182 | _runningScriptsWidgetWasVisible(false), |
| 182 | 183 | _trayIcon(new QSystemTrayIcon(_window)), |
| @@ -835,7 +836,7 @@ bool Application::event(QEvent* event) { · 652 unmodified lines | ||
| 835 | 836 | |
| 836 | 837 | return false; |
| 837 | 838 | } |
| 838 | − | |
| 839 | + | |
| 839 | 840 | return QApplication::event(event); |
| 840 | 841 | } |
| 841 | 842 | |
| @@ -1245,7 +1246,7 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 403 unmodified lines | ||
| 1245 | 1246 | |
| 1246 | 1247 | // nobody handled this - make it an action event on the _window object |
| 1247 | 1248 | HFActionEvent actionEvent(HFActionEvent::startType(), event->localPos()); |
| 1248 | − sendEvent(_window, &actionEvent); | |
| 1249 | + sendEvent(this, &actionEvent); | |
| 1249 | 1250 | |
| 1250 | 1251 | } else if (event->button() == Qt::RightButton) { |
| 1251 | 1252 | // right click items here |
| @@ -1276,7 +1277,7 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) { · 24 unmodified lines | ||
| 1276 | 1277 | |
| 1277 | 1278 | // fire an action end event |
| 1278 | 1279 | HFActionEvent actionEvent(HFActionEvent::endType(), event->localPos()); |
| 1279 | − sendEvent(_window, &actionEvent); | |
| 1280 | + sendEvent(this, &actionEvent); | |
| 1280 | 1281 | } |
| 1281 | 1282 | } |
| 1282 | 1283 | } |