From 38bd05de16812282fc2ea2d11d6ed7de5c67ef6e Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Fri, 15 Jan 2010 20:54:57 +0000 Subject: [PATCH] Minor fixes for Value components. --- juce_amalgamated.cpp | 5 ++++- src/gui/components/controls/juce_TextEditor.cpp | 1 + .../components/properties/juce_BooleanPropertyComponent.cpp | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 487c935b2d..b0f7e516d2 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -52340,6 +52340,7 @@ TextEditor::TextEditor (const String& name, TextEditor::~TextEditor() { + textValue.referTo (Value()); clearInternal (0); viewport = 0; textHolder = 0; @@ -70831,7 +70832,9 @@ BooleanPropertyComponent::BooleanPropertyComponent (const String& name, BooleanPropertyComponent::BooleanPropertyComponent (const Value& valueToControl, const String& name, const String& buttonText) - : PropertyComponent (name) + : PropertyComponent (name), + onText (buttonText), + offText (buttonText) { createButton(); button->setButtonText (buttonText); diff --git a/src/gui/components/controls/juce_TextEditor.cpp b/src/gui/components/controls/juce_TextEditor.cpp index 3aafdf85ae..40eaeb6d21 100644 --- a/src/gui/components/controls/juce_TextEditor.cpp +++ b/src/gui/components/controls/juce_TextEditor.cpp @@ -1008,6 +1008,7 @@ TextEditor::TextEditor (const String& name, TextEditor::~TextEditor() { + textValue.referTo (Value()); clearInternal (0); viewport = 0; textHolder = 0; diff --git a/src/gui/components/properties/juce_BooleanPropertyComponent.cpp b/src/gui/components/properties/juce_BooleanPropertyComponent.cpp index 2a6e8f654e..0569596ed0 100644 --- a/src/gui/components/properties/juce_BooleanPropertyComponent.cpp +++ b/src/gui/components/properties/juce_BooleanPropertyComponent.cpp @@ -46,7 +46,9 @@ BooleanPropertyComponent::BooleanPropertyComponent (const String& name, BooleanPropertyComponent::BooleanPropertyComponent (const Value& valueToControl, const String& name, const String& buttonText) - : PropertyComponent (name) + : PropertyComponent (name), + onText (buttonText), + offText (buttonText) { createButton(); button->setButtonText (buttonText);