Changeset 1778

Show
Ignore:
Timestamp:
2008-03-22 18:56:03 (3 months ago)
Author:
fredck
Message:

Fixed #2042 : The FitWindow command was throwing an error if executed in an editor where its relative button is not present in the toolbar.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fcktoolbarbutton.js

    r1565 r1778  
    4949FCKToolbarButton.prototype.RefreshState = function() 
    5050{ 
     51        var uiButton = this._UIButton ; 
     52 
     53        if ( !uiButton ) 
     54                return ; 
     55 
    5156        // Gets the actual state. 
    5257        var eState = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ; 
    5358 
    5459        // If there are no state changes than do nothing and return. 
    55         if ( eState == this._UIButton.State ) return ; 
     60        if ( eState == uiButton.State ) return ; 
    5661 
    5762        // Sets the actual state. 
    58         this._UIButton.ChangeState( eState ) ; 
     63        uiButton.ChangeState( eState ) ; 
    5964} 
    6065 
  • FCKeditor/trunk/_whatsnew.html

    r1777 r1778  
    121121                        having problems with SpellerPages, causing some errors to be thrown when completing 
    122122                        the spell checking in some situations.</li> 
     123                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2042">#2042</a>] The FitWindow 
     124                        command was throwing an error if executed in an editor where its relative button 
     125                        is not present in the toolbar.</li> 
    123126        </ul> 
    124127        <h3>