after loading a new file): let undo_stack = Įxport function done(undo_fn, redo_fn, _log = null) This is the undo.js module - basically four methods - done to record the custom undo/redo callbacks, undo and redo to al them and reset to remove all undos/redos (e.g.
I have done this recently in Javascript - but I think this could still help you. I probably shouldn't optimise early, but the domain for the application is pretty strict.Īre these good ways of solving the problem? What else can I try?
WHAT IS THE REDO COMMAND HOW TO
I have some ideas on how to solve this but would like some input. I've done some digging and have found this described in this blog post but no solutions were posted. Then the first command that adds the object will have its own internal reference to the object nullified since the Remove command destroys the original and creates a new one. Removing an object means destroying it, so if I: add an object My initial commands comprise of adding and removing objects to and from a space, but I'm encountering commands that lose their reference to their object. The environment is Unity C# but should be mostly language-agnostic. In the Status Bar drag the slider or type a value in the percentage text boxĬtrl + B (twice).I'm developing a Command Pattern with Undo/Redo support. Scroll bottom right image to center screen Scroll image to bottom right of editing window Scroll image to top left of editing window
Shift + Mouse Wheel down, Shift + PgDn or End x 1 If the user increase the num from 0 to 50 by pressing '+', then the. For example, I have a 'int num', when I press '+' on the keyboard, the program will do '++num'. However, when a command is intend to repeat x times, then undo x times would be troublesome for the users. Shift + Mouse Wheel up, Shift + PgUp or Home x 1 So, I understand that undo/redo is usually implemented by command pattern. Hold Spacebar + drag with Left Mouse Button Pan image (does not work while typing with the Text tool) Multiple key presses should be less than a second apart. If more than one tool shares the same shortcut, pressing the shortcut repeatedly will cycle through each of the tools in turn.ĭigits shown like this - x3 - denote the number of times the key should be pressed to activate the tool group and cycle to the specific tool. Most commands in can be quickly accessed via the keyboard. For your convenience, all of the keyboard shortcuts are listed here. The default settings are adequate for regular Autodesk Navisworks usage, but you can adjust the amount of space allocated to the undo/redo buffer, if necessary. Revision Date: 14 April 2021 Keyboard & Mouse Commands You can undo or redo your actions in Autodesk Navisworks.