Always update the internal knowledge of the first text view when a

text container tells us that it has changed text view


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12493 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2002-02-11 16:37:21 +00:00
parent 7cf324ce6f
commit 48cddb85f1

View file

@ -906,26 +906,27 @@ _Sane(self);
keep notifications in synch. */
- (void) textContainerChangedTextView: (NSTextContainer*)aContainer
{
/* It only makes sense if we have more than one text container */
if (_textContainersCount > 1)
unsigned index;
index = [_textContainers indexOfObjectIdenticalTo: aContainer];
if (index != NSNotFound)
{
unsigned index;
index = [_textContainers indexOfObjectIdenticalTo: aContainer];
if (index != NSNotFound)
if (index == 0)
{
if (index == 0)
_firstTextView = [aContainer textView];
/* It only makes sense to update the other text views if we
have more than one text container */
if (_textContainersCount > 1)
{
/* It's the first text view. Need to update everything. */
int i;
_firstTextView = [aContainer textView];
for (i = 0; i < _textContainersCount; i++)
{
NSTextView *tv;
tv = [[_textContainers objectAtIndex: i] textView];
[tv _updateMultipleTextViews];
}