mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
fix a crash which occurred when dragging a lot of rows towards the bottom of the table
This commit is contained in:
parent
6302c64c59
commit
8a54976d94
2 changed files with 6 additions and 4 deletions
|
@ -2462,8 +2462,8 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
[pasteboard dataForType: TORRENT_TABLE_VIEW_DATA_TYPE]];
|
||||
|
||||
//determine where to move them
|
||||
int i;
|
||||
for (i = [indexes firstIndex]; i < newRow && i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
|
||||
int i, originalRow = newRow;
|
||||
for (i = [indexes firstIndex]; i < originalRow && i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
|
||||
newRow--;
|
||||
|
||||
//reinsert into array
|
||||
|
@ -3387,6 +3387,8 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
return NO;
|
||||
}
|
||||
|
||||
#warning hide queue options if all queues are disabled?
|
||||
|
||||
//enable resume all waiting item
|
||||
if (action == @selector(resumeWaitingTorrents:))
|
||||
{
|
||||
|
|
|
@ -244,8 +244,8 @@ GroupsWindowController * fGroupsWindowInstance = nil;
|
|||
NSArray * selectedGroups = [fGroups objectsAtIndexes: [fTableView selectedRowIndexes]];
|
||||
|
||||
//determine where to move them
|
||||
int i;
|
||||
for (i = [indexes firstIndex]; i < newRow && i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
|
||||
int i, originalRow = newRow;
|
||||
for (i = [indexes firstIndex]; i < originalRow && i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
|
||||
newRow--;
|
||||
|
||||
//remove objects to reinsert
|
||||
|
|
Loading…
Reference in a new issue