mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 22:01:54 +00:00
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:
parent
7cf324ce6f
commit
48cddb85f1
1 changed files with 13 additions and 12 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue