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
976976 _window(new MainWindow(desktop())),
977977 _sessionRunTimer(startupTimer),
978978 _previousSessionCrashed(setupEssentials(argc, argv, runningMarkerExisted)),
979− _undoStackScriptingInterface(&_undoStack),
980979 _entitySimulation(new PhysicalEntitySimulation()),
981980 _physicsEngine(new PhysicsEngine(Vectors::ZERO)),
982981 _entityClipboard(new EntityTree()),
@@ -3086,7 +3085,6 @@ void Application::onDesktopRootContextCreated(QQmlContext* surfaceContext) { · 2103 unmodified lines
30863085 surfaceContext->setContextProperty("DialogsManager", _dialogsManagerScriptingInterface);
30873086 surfaceContext->setContextProperty("FaceTracker", DependencyManager::get<DdeFaceTracker>().data());
30883087 surfaceContext->setContextProperty("AvatarManager", DependencyManager::get<AvatarManager>().data());
3089− surfaceContext->setContextProperty("UndoStack", &_undoStackScriptingInterface);
30903088 surfaceContext->setContextProperty("LODManager", DependencyManager::get<LODManager>().data());
30913089 surfaceContext->setContextProperty("HMD", DependencyManager::get<HMDScriptingInterface>().data());
30923090 surfaceContext->setContextProperty("Scene", DependencyManager::get<SceneScriptingInterface>().data());
@@ -6746,8 +6744,6 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 3653 unmodified lines
67466744
67476745 scriptEngine->registerGlobalObject("AvatarManager", DependencyManager::get<AvatarManager>().data());
67486746
6749− scriptEngine->registerGlobalObject("UndoStack", &_undoStackScriptingInterface);
6750−
67516747 scriptEngine->registerGlobalObject("LODManager", DependencyManager::get<LODManager>().data());
67526748
67536749 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