diff --git a/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp b/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp index 61f5972085..118ae299c5 100644 --- a/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp +++ b/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp @@ -219,9 +219,19 @@ public: String s; s.preallocateStorage (getTotalLength()); - for (int i = 0; i < atoms.size(); ++i) - s += getAtom(i)->atomText; + tchar* endOfString = (tchar*) &(s[0]); + for (int i = 0; i < atoms.size(); ++i) + { + const TextAtom* const atom = getAtom(i); + + memcpy (endOfString, &(atom->atomText[0]), atom->numChars * sizeof (tchar)); + endOfString += atom->numChars; + } + + *endOfString = 0; + + jassert ((endOfString - (tchar*) &(s[0])) <= getTotalLength()); return s; } diff --git a/src/juce_appframework/gui/components/juce_Component.cpp b/src/juce_appframework/gui/components/juce_Component.cpp index 499b3cffd3..7a153574c8 100644 --- a/src/juce_appframework/gui/components/juce_Component.cpp +++ b/src/juce_appframework/gui/components/juce_Component.cpp @@ -250,7 +250,10 @@ void Component::setVisible (bool shouldBeVisible) jassert (peer != 0); if (peer != 0) + { peer->setVisible (shouldBeVisible); + internalHierarchyChanged(); + } } } } @@ -876,8 +879,8 @@ void Component::setBounds (int x, int y, int w, int h) const bool wasMoved = (getX() != x || getY() != y); #ifdef JUCE_DEBUG - // It's a very bad idea to try to resize a component during its paint() method! - jassert (! (flags.isInsidePaintCall && wasResized)); + // It's a very bad idea to try to resize a window during its paint() method! + jassert (! (flags.isInsidePaintCall && wasResized && isOnDesktop())); #endif if (wasMoved || wasResized) diff --git a/src/juce_core/io/network/juce_Socket.cpp b/src/juce_core/io/network/juce_Socket.cpp index 5763a178d7..0a0947310c 100644 --- a/src/juce_core/io/network/juce_Socket.cpp +++ b/src/juce_core/io/network/juce_Socket.cpp @@ -270,7 +270,10 @@ static bool connectSocket (int volatile& handle, #endif { if (waitForReadiness (handle, false, timeOutMillisecs) != 1) + { + setSocketBlockingState (handle, true); return false; + } } }