Changeset 10775


Ignore:
Timestamp:
Jun 16, 2010, 3:11:10 AM (12 years ago)
Author:
Longinus00
Message:

(qt) #3269: When changing session source we should request a full refresh right away
r10770 is actually for #3282: After removing a torrent list jumps to the very top

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/app.cc

    r10731 r10775  
    160160    connect( mySession, SIGNAL(torrentsUpdated(tr_benc*,bool)), myWindow, SLOT(refreshActionSensitivity()) );
    161161    connect( mySession, SIGNAL(torrentsRemoved(tr_benc*)), myModel, SLOT(removeTorrents(tr_benc*)) );
     162    // when the session source gets changed, request a full refresh
     163    connect( mySession, SIGNAL(sourceChanged()), this, SLOT(onSessionSourceChanged()) );
    162164    // when the model sees a torrent for the first time, ask the session for full info on it
    163165    connect( myModel, SIGNAL(torrentsAdded(QSet<int>)), mySession, SLOT(initTorrents(QSet<int>)) );
     
    301303
    302304void
     305MyApp :: onSessionSourceChanged( )
     306{
     307    mySession->initTorrents( );
     308    mySession->refreshSessionStats( );
     309    mySession->refreshSessionInfo( );
     310}
     311
     312void
    303313MyApp :: refreshTorrents( )
    304314{
  • trunk/qt/app.h

    r10532 r10775  
    4747    private slots:
    4848        void consentGiven( );
     49        void onSessionSourceChanged( );
    4950        void refreshPref( int key );
    5051        void refreshTorrents( );
Note: See TracChangeset for help on using the changeset viewer.