diff --git a/modules/juce_data_structures/undomanager/juce_UndoManager.cpp b/modules/juce_data_structures/undomanager/juce_UndoManager.cpp index 07948c69eb..c1c1741169 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoManager.cpp +++ b/modules/juce_data_structures/undomanager/juce_UndoManager.cpp @@ -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]; } diff --git a/modules/juce_data_structures/undomanager/juce_UndoManager.h b/modules/juce_data_structures/undomanager/juce_UndoManager.h index a3b691b692..ad22272bff 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoManager.h +++ b/modules/juce_data_structures/undomanager/juce_UndoManager.h @@ -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 diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.h b/modules/juce_gui_basics/widgets/juce_TextEditor.h index 37082a2b49..ccaa1bce8d 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.h +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.h @@ -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