Changeset 8256 for trunk/qt/details.cc


Ignore:
Timestamp:
Apr 19, 2009, 2:48:55 AM (13 years ago)
Author:
charles
Message:

(trunk qt) fix feedback loop between the gui and libT for the properties dialog's seed ratio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/details.cc

    r8255 r8256  
    447447        }
    448448
     449        mySeedCustomSpin->blockSignals( true );
    449450        mySeedCustomSpin->setValue( tor->seedRatioLimit( ) );
     451        mySeedCustomSpin->blockSignals( false );
    450452    }
    451453
     
    646648Details :: onSeedRatioLimitChanged( double val )
    647649{
    648     mySession.torrentSet( myIds, "seedRatioLimit", val );
     650    QSet<int> ids;
     651
     652    foreach( int id, myIds ) {
     653        const Torrent * tor = myModel.getTorrentFromId( id );
     654        if( tor && tor->seedRatioLimit( ) )
     655            ids.insert( id );
     656    }
     657
     658    if( !ids.empty( ) )
     659        mySession.torrentSet( ids, "seedRatioLimit", val );
    649660}
    650661
     
    709720    m->addItem( tr( "High" ),   TR_PRI_HIGH );
    710721    connect( m, SIGNAL(currentIndexChanged(int)), this, SLOT(onBandwidthPriorityChanged(int)));
    711     hig->addRow( tr( "Bandwidth priority:" ), m );
     722    hig->addRow( tr( "&Bandwidth priority:" ), m );
    712723    myBandwidthPriorityCombo = m;
    713724   
Note: See TracChangeset for help on using the changeset viewer.