mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added method UndoManager::getCurrentTransactionName
This commit is contained in:
parent
79c5c34466
commit
db4a0ffec5
3 changed files with 14 additions and 1 deletions
|
|
@ -203,6 +203,14 @@ void UndoManager::setCurrentTransactionName (const String& newName) noexcept
|
|||
action->name = newName;
|
||||
}
|
||||
|
||||
String UndoManager::getCurrentTransactionName() const noexcept
|
||||
{
|
||||
if (ActionSet* action = getCurrentSet())
|
||||
return action->name;
|
||||
|
||||
return newTransactionName;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
UndoManager::ActionSet* UndoManager::getCurrentSet() const noexcept { return transactions [nextIndex - 1]; }
|
||||
UndoManager::ActionSet* UndoManager::getNextSet() const noexcept { return transactions [nextIndex]; }
|
||||
|
|
|
|||
|
|
@ -144,6 +144,11 @@ public:
|
|||
*/
|
||||
void setCurrentTransactionName (const String& newName) noexcept;
|
||||
|
||||
/** Returns the name of the current transaction.
|
||||
@see setCurrentTransactionName
|
||||
*/
|
||||
String getCurrentTransactionName() const noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns true if there's at least one action in the list to undo.
|
||||
@see getUndoDescription, undo, canRedo
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ public:
|
|||
|
||||
These constants can be used either via the Component::setColour(), or LookAndFeel::setColour()
|
||||
methods.
|
||||
|
||||
|
||||
NB: You can also set the caret colour using CaretComponent::caretColourId
|
||||
|
||||
@see Component::setColour, Component::findColour, LookAndFeel::setColour, LookAndFeel::findColour
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue