mirror of
https://github.com/transmission/transmission
synced 2025-01-05 06:23:11 +00:00
(trunk qt) fix feedback loop between the gui and libT for the properties dialog's seed ratio
This commit is contained in:
parent
d82b4a5fc6
commit
dc6da4139d
1 changed files with 13 additions and 2 deletions
|
@ -446,7 +446,9 @@ Details :: refresh( )
|
||||||
rb->setChecked( true );
|
rb->setChecked( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mySeedCustomSpin->blockSignals( true );
|
||||||
mySeedCustomSpin->setValue( tor->seedRatioLimit( ) );
|
mySeedCustomSpin->setValue( tor->seedRatioLimit( ) );
|
||||||
|
mySeedCustomSpin->blockSignals( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
// tracker tab
|
// tracker tab
|
||||||
|
@ -645,7 +647,16 @@ Details :: onSeedUntilChanged( bool b )
|
||||||
void
|
void
|
||||||
Details :: onSeedRatioLimitChanged( double val )
|
Details :: onSeedRatioLimitChanged( double val )
|
||||||
{
|
{
|
||||||
mySession.torrentSet( myIds, "seedRatioLimit", val );
|
QSet<int> ids;
|
||||||
|
|
||||||
|
foreach( int id, myIds ) {
|
||||||
|
const Torrent * tor = myModel.getTorrentFromId( id );
|
||||||
|
if( tor && tor->seedRatioLimit( ) )
|
||||||
|
ids.insert( id );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !ids.empty( ) )
|
||||||
|
mySession.torrentSet( ids, "seedRatioLimit", val );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -708,7 +719,7 @@ Details :: createOptionsTab( )
|
||||||
m->addItem( tr( "Normal" ), TR_PRI_NORMAL );
|
m->addItem( tr( "Normal" ), TR_PRI_NORMAL );
|
||||||
m->addItem( tr( "High" ), TR_PRI_HIGH );
|
m->addItem( tr( "High" ), TR_PRI_HIGH );
|
||||||
connect( m, SIGNAL(currentIndexChanged(int)), this, SLOT(onBandwidthPriorityChanged(int)));
|
connect( m, SIGNAL(currentIndexChanged(int)), this, SLOT(onBandwidthPriorityChanged(int)));
|
||||||
hig->addRow( tr( "Bandwidth priority:" ), m );
|
hig->addRow( tr( "&Bandwidth priority:" ), m );
|
||||||
myBandwidthPriorityCombo = m;
|
myBandwidthPriorityCombo = m;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue