         @_selectedProject = n
         @selectedAccount  = @_data[n.url].account
         @queries          = @_data[n.url].queries
+        @_sortSelectedProjectTop(@_tickets)
         @fireEvent(@SELECTED_PROJECT_CHANGED, @, n)
         Log.debug("selectedProject set: " + n.text)
 

    @property 'tickets',
      get: -> @_tickets
      set: (n) ->
        @_tickets.set _sortTickets(n)
        @selectedTicket = n[0]
        @fireEvent(@TICKETS_CHANGED, @)


    ###
    addTicket: (ticket) ->
      @_tickets.add ticket
      @_sortTickets(@_tickets)
      @fireEvent(@TICKETS_CHANGED, @)

    ###*
