Std Undo/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 2: Line 2:


{{Docnav
{{Docnav
|
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Redo|Std Redo]]
|[[Std_Redo|Std Redo]]
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=
|IconL=
|IconC=Freecad.svg
|IconR=Std_Redo.svg
|IconR=Std_Redo.svg
|IconC=Freecad.svg
}}
}}


{{GuiCommand
{{GuiCommand
|Name=Std Undo
|Name=Std Undo
|MenuLocation={{StdMenu|[[Std_Edit_Menu|Edit]]}} → Undo
|MenuLocation=Edit → Undo
|Workbenches=All
|Workbenches=All
|Shortcut={{KEY|Ctrl}}+{{KEY|Z}}
|Shortcut={{KEY|Ctrl}}+{{KEY|Z}}
|SeeAlso=[[Std Redo|Redo]]
|SeeAlso=[[Std_Redo|Std Redo]]
}}
}}


==Description==
==Description==

Undoes exactly one action.
The '''Std Undo''' command undoes the last action.


==Usage==
==Usage==


# There are several ways to invoke the Undo command:
# There are several ways to invoke the command:
# Press on the [[Image:Std_Undo.svg|24px]] button in the toolbar
#* Press the {{Button|[[Image:Std_Undo.svg|16px]] [[Std_Undo|Std Undo]]}} button.
# Using the {{MenuCommand|{{StdMenu|[[Std Edit Menu|Edit]]}} → [[Image:Std_Undo.svg|16px]] Undo}} from the top menu.
#* Select the {{MenuCommand|Edit → [[Image:Std_Undo.svg|16px]] Undo}} option from the menu.
# Using the {{KEY|Ctrl}} + {{KEY|Z}} keyboard shortcut.
#* Use the keyboard shortcut: {{KEY|Ctrl}}+{{KEY|Z}}.


==Options==
'''Note:''' Click on the black down-arrow on the right side of the icon to get a list of the last (Max = 12) actions to undo from.


* To undo multiple actions click on the black down arrow to the right of the {{Button|[[Image:Std_Undo.svg|16px]] [[Std_Undo|Std Undo]]}} button and select from the list.
==Notes==


==Limitations==
==Preferences==

* The Undo/Redo functionality can be disabled by setting {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → UsingUndo}} to {{FALSE}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].
* The maximum number of Undo/Redo steps is controlled by {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → MaxUndoSize}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].


==Scripting==
==Scripting==

{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

To undo the last action use the {{incode|undo}} method of the document object.

{{Code|code=
import FreeCAD

FreeCAD.ActiveDocument.undo()
}}


{{Docnav
{{Docnav
|
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Redo|Std Redo]]
|[[Std_Redo|Std Redo]]
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=
|IconL=
|IconR=Std_Redo.svg
|IconC=Freecad.svg
|IconC=Freecad.svg
|IconR=Std_Redo.svg
}}
}}


{{Std Base navi}}
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

{{Userdocnavi}}
{{clear}}
{{clear}}

Revision as of 21:47, 23 March 2020

Std Undo

Menu location
Edit → Undo
Workbenches
All
Default shortcut
Ctrl+Z
Introduced in version
-
See also
Std Redo

Description

The Std Undo command undoes the last action.

Usage

  1. There are several ways to invoke the command:
    • Press the Std Undo button.
    • Select the Edit → Undo option from the menu.
    • Use the keyboard shortcut: Ctrl+Z.

Options

  • To undo multiple actions click on the black down arrow to the right of the Std Undo button and select from the list.

Preferences

  • The Undo/Redo functionality can be disabled by setting Tools → Edit parameters... → BaseApp → Preferences → Document → UsingUndo to false. This setting can also be changed in the Preferences Editor.
  • The maximum number of Undo/Redo steps is controlled by Tools → Edit parameters... → BaseApp → Preferences → Document → MaxUndoSize. This setting can also be changed in the Preferences Editor.

Scripting

See also: FreeCAD Scripting Basics.

To undo the last action use the undo method of the document object.

import FreeCAD

FreeCAD.ActiveDocument.undo()