Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
fe3524b443
3 changed files with 19 additions and 3 deletions
  1. +11
    -1
      src/juce_appframework/gui/components/controls/juce_TextEditor.cpp
  2. +5
    -2
      src/juce_appframework/gui/components/juce_Component.cpp
  3. +3
    -0
      src/juce_core/io/network/juce_Socket.cpp

+ 11
- 1
src/juce_appframework/gui/components/controls/juce_TextEditor.cpp View File

@@ -219,9 +219,19 @@ public:
String s;
s.preallocateStorage (getTotalLength());
tchar* endOfString = (tchar*) &(s[0]);
for (int i = 0; i < atoms.size(); ++i)
s += getAtom(i)->atomText;
{
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;
}


+ 5
- 2
src/juce_appframework/gui/components/juce_Component.cpp View File

@@ -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)


+ 3
- 0
src/juce_core/io/network/juce_Socket.cpp View File

@@ -270,7 +270,10 @@ static bool connectSocket (int volatile& handle,
#endif
{
if (waitForReadiness (handle, false, timeOutMillisecs) != 1)
{
setSocketBlockingState (handle, true);
return false;
}
}
}


Loading…
Cancel
Save