Mercurial > hg > svcore
diff base/CommandHistory.h @ 115:90ade4fa63be
* Fix serious failure to reload "imported" (i.e. all non-derived non-main)
models from .sv file
* Give a short playback duration to notes with formal duration of 0 or 1
* Show crosshairs on spectrogram even when there is another layer on top
(if it isn't opaque)
* Always paste to the same time in the layer as the cut/copy was from, rather
than to the playback pointer -- less flexible, but more predictable and
less annoying. We probably need a way to get the old behaviour if pasting
from somewhere else in the future (e.g. from a text file), but we can't do
that yet anyway
* Use a compound operation for dragging and resizing selections, so as to
ensure a single undo operation works
* Use a note model as the target for feature extraction plugins that output
variable samplerate data with more than one value per feature
* Avoid possible crashes in cut/paste if a layer proves to have no model
author | Chris Cannam |
---|---|
date | Thu, 11 May 2006 11:35:46 +0000 |
parents | d397ea0a79f5 |
children | 4c5c62784211 |
line wrap: on
line diff
--- a/base/CommandHistory.h Wed May 10 16:34:03 2006 +0000 +++ b/base/CommandHistory.h Thu May 11 11:35:46 2006 +0000 @@ -65,6 +65,16 @@ /** * Add a command to the command history. + * + * The command will normally be executed before being added; but + * if a compound operation is in use (see startCompoundOperation + * below), the execute status of the compound operation will + * determine whether the command is executed or not. + */ + void addCommand(Command *command); + + /** + * Add a command to the command history. * * If execute is true, the command will be executed before being * added. Otherwise it will be assumed to have been already @@ -72,8 +82,10 @@ * its work has actually been done somehow! * * If a compound operation is in use (see startCompoundOperation - * below), the execute status of the compound operation will - * override any value of execute passed to this method. + * below), the execute value passed to this method will override + * the execute status of the compound operation. In this way it's + * possible to have a compound operation mixing both to-execute + * and pre-executed commands. * * If bundle is true, the command will be a candidate for bundling * with any adjacent bundeable commands that have the same name, @@ -83,7 +95,7 @@ * not known in advance. The bundle parameter will be ignored if * a compound operation is already in use. */ - void addCommand(Command *command, bool execute = true, bool bundle = false); + void addCommand(Command *command, bool execute, bool bundle = false); /// Return the maximum number of items in the undo history. int getUndoLimit() const { return m_undoLimit; } @@ -192,7 +204,7 @@ MacroCommand *m_currentCompound; bool m_executeCompound; - void addToCompound(Command *command); + void addToCompound(Command *command, bool execute); MacroCommand *m_currentBundle; QString m_currentBundleName;