History

Remove UndoStack API

edit.js shares a global undo stack through the UndoStack API. Because the stack is globally shared, disabling the feature while create is disabled doesn't make a lot of sense because it might disabling the ability to undo/redo with another feature. Because UndoStack is only used by edit.js, UndoStack is being removed in favor of a local undo stack implemented within edit.js.

Ryan Huffman committed 8 years ago

Commit 09b25651 parent 3b1e0dc6 files · +102 −143Browse files

Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all

Unified · Split

interface/src/Application.cpp+0−4
@@ -976,7 +976,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 975 unmodified lines
976 _window(new MainWindow(desktop())),976 _window(new MainWindow(desktop())),
977 _sessionRunTimer(startupTimer),977 _sessionRunTimer(startupTimer),
978 _previousSessionCrashed(setupEssentials(argc, argv, runningMarkerExisted)),978 _previousSessionCrashed(setupEssentials(argc, argv, runningMarkerExisted)),
979 _undoStackScriptingInterface(&_undoStack),
980 _entitySimulation(new PhysicalEntitySimulation()),979 _entitySimulation(new PhysicalEntitySimulation()),
981 _physicsEngine(new PhysicsEngine(Vectors::ZERO)),980 _physicsEngine(new PhysicsEngine(Vectors::ZERO)),
982 _entityClipboard(new EntityTree()),981 _entityClipboard(new EntityTree()),
@@ -3086,7 +3085,6 @@ void Application::onDesktopRootContextCreated(QQmlContext* surfaceContext) { · 2103 unmodified lines
3086 surfaceContext->setContextProperty("DialogsManager", _dialogsManagerScriptingInterface);3085 surfaceContext->setContextProperty("DialogsManager", _dialogsManagerScriptingInterface);
3087 surfaceContext->setContextProperty("FaceTracker", DependencyManager::get<DdeFaceTracker>().data());3086 surfaceContext->setContextProperty("FaceTracker", DependencyManager::get<DdeFaceTracker>().data());
3088 surfaceContext->setContextProperty("AvatarManager", DependencyManager::get<AvatarManager>().data());3087 surfaceContext->setContextProperty("AvatarManager", DependencyManager::get<AvatarManager>().data());
3089 surfaceContext->setContextProperty("UndoStack", &_undoStackScriptingInterface);
3090 surfaceContext->setContextProperty("LODManager", DependencyManager::get<LODManager>().data());3088 surfaceContext->setContextProperty("LODManager", DependencyManager::get<LODManager>().data());
3091 surfaceContext->setContextProperty("HMD", DependencyManager::get<HMDScriptingInterface>().data());3089 surfaceContext->setContextProperty("HMD", DependencyManager::get<HMDScriptingInterface>().data());
3092 surfaceContext->setContextProperty("Scene", DependencyManager::get<SceneScriptingInterface>().data());3090 surfaceContext->setContextProperty("Scene", DependencyManager::get<SceneScriptingInterface>().data());
@@ -6746,8 +6744,6 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 3653 unmodified lines
6746 6744
6747 scriptEngine->registerGlobalObject("AvatarManager", DependencyManager::get<AvatarManager>().data());6745 scriptEngine->registerGlobalObject("AvatarManager", DependencyManager::get<AvatarManager>().data());
6748 6746
6749 scriptEngine->registerGlobalObject("UndoStack", &_undoStackScriptingInterface);
6750
6751 scriptEngine->registerGlobalObject("LODManager", DependencyManager::get<LODManager>().data());6747 scriptEngine->registerGlobalObject("LODManager", DependencyManager::get<LODManager>().data());
6752 6748
6753 scriptEngine->registerGlobalObject("Paths", DependencyManager::get<PathUtils>().data());6749 scriptEngine->registerGlobalObject("Paths", DependencyManager::get<PathUtils>().data());

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t