Skip to content

Commit

Permalink
Focus to first row after selecting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DasSkelett committed Mar 27, 2018
1 parent 90f7e16 commit a02a3b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions GUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,16 +477,20 @@ private void MarkAllUpdatesToolButton_Click(object sender, EventArgs e)
}
}


// set new sort column
var new_sort_column = ModList.Columns[1];
var current_sort_column = ModList.Columns[configuration.SortByColumnIndex];

// Reset the glyph.
current_sort_column.HeaderCell.SortGlyphDirection = SortOrder.None;
configuration.SortByColumnIndex = new_sort_column.Index;
UpdateFilters(this);

ModList.Refresh();

// Selects the top/bottom row and scrolls the list to it.
DataGridViewCell cell = ModList.Rows[0].Cells[2];
ModList.CurrentCell = cell;
}

public void UpdateModContentsTree(CkanModule module, bool force = false)
Expand Down

0 comments on commit a02a3b1

Please sign in to comment.