From 7dc5e33d523c361928a4fde4f0868d2c2ee1beb4 Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 9 Aug 2007 11:03:30 +0000 Subject: [PATCH] --- .../audio/audio_sources/juce_AudioSource.h | 2 +- src/juce_appframework/audio/dsp/juce_IIRFilter.h | 12 ++++++------ .../gui/components/controls/juce_ListBox.h | 2 ++ .../gui/components/controls/juce_TextEditor.cpp | 10 ++++++++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/juce_appframework/audio/audio_sources/juce_AudioSource.h b/src/juce_appframework/audio/audio_sources/juce_AudioSource.h index c6844b0c45..f689b720ba 100644 --- a/src/juce_appframework/audio/audio_sources/juce_AudioSource.h +++ b/src/juce_appframework/audio/audio_sources/juce_AudioSource.h @@ -122,7 +122,7 @@ public: method called, so it should release any spare memory, etc. that it might have allocated during the prepareToPlay() call. - Note that there's no guarantee that prepareToPlay() will actually have been called before + Note that there's no guarantee that prepareToPlay() will actually have been called before releaseResources(), and it may be called more than once in succession, so make sure your code is robust and doesn't make any assumptions about when it will be called. diff --git a/src/juce_appframework/audio/dsp/juce_IIRFilter.h b/src/juce_appframework/audio/dsp/juce_IIRFilter.h index 3e913254aa..4bad83484c 100644 --- a/src/juce_appframework/audio/dsp/juce_IIRFilter.h +++ b/src/juce_appframework/audio/dsp/juce_IIRFilter.h @@ -88,8 +88,8 @@ public: //============================================================================== /** Sets the filter up to act as a low-pass shelf filter with variable Q and gain. - The gain is a scale factor that the low frequencies are multiplied by, so values - greater than 1.0 will boost the low frequencies, values less than 1.0 will + The gain is a scale factor that the low frequencies are multiplied by, so values + greater than 1.0 will boost the low frequencies, values less than 1.0 will attenuate them. */ void makeLowShelf (const double sampleRate, @@ -99,8 +99,8 @@ public: /** Sets the filter up to act as a high-pass shelf filter with variable Q and gain. - The gain is a scale factor that the high frequencies are multiplied by, so values - greater than 1.0 will boost the high frequencies, values less than 1.0 will + The gain is a scale factor that the high frequencies are multiplied by, so values + greater than 1.0 will boost the high frequencies, values less than 1.0 will attenuate them. */ void makeHighShelf (const double sampleRate, @@ -111,8 +111,8 @@ public: /** Sets the filter up to act as a band pass filter centred around a frequency, with a variable Q and gain. - The gain is a scale factor that the centre frequencies are multiplied by, so - values greater than 1.0 will boost the centre frequencies, values less than + The gain is a scale factor that the centre frequencies are multiplied by, so + values greater than 1.0 will boost the centre frequencies, values less than 1.0 will attenuate them. */ void makeBandPass (const double sampleRate, diff --git a/src/juce_appframework/gui/components/controls/juce_ListBox.h b/src/juce_appframework/gui/components/controls/juce_ListBox.h index 54c142bcd4..7b9b5a4cbd 100644 --- a/src/juce_appframework/gui/components/controls/juce_ListBox.h +++ b/src/juce_appframework/gui/components/controls/juce_ListBox.h @@ -184,8 +184,10 @@ public: //============================================================================== + /** Changes the current data model to display. */ void setModel (ListBoxModel* const newModel); + /** Returns the current list model. */ ListBoxModel* getModel() const throw() { return model; } diff --git a/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp b/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp index c7a2bbeab6..d8aec5aab4 100644 --- a/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp +++ b/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp @@ -1069,8 +1069,14 @@ void TextEditor::applyFontToAllText (const Font& newFont) { currentFont = newFont; + const Colour overallColour (findColour (textColourId)); + for (int i = sections.size(); --i >= 0;) - ((UniformTextSection*) sections.getUnchecked(i))->setFont (newFont, passwordCharacter); + { + UniformTextSection* const uts = (UniformTextSection*) sections.getUnchecked(i); + uts->setFont (newFont, passwordCharacter); + uts->colour = overallColour; + } coalesceSimilarSections(); updateTextHolderSize(); @@ -1447,7 +1453,7 @@ void TextEditor::moveCursorTo (const int newPosition, jassert (selectionStart <= selectionEnd); jassert (oldSelStart <= oldSelEnd); - repaintText (jmin (oldSelStart, selectionStart), + repaintText (jmin (oldSelStart, selectionStart), jmax (oldSelEnd, selectionEnd)); } else