Don't allow deselection of the only selected line

Originally committed to SVN as r4617.
This commit is contained in:
Thomas Goyne 2010-06-27 04:55:19 +00:00
parent 11b30c8bb4
commit 7c4bf32566
1 changed files with 3 additions and 1 deletions

View File

@ -773,7 +773,9 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
// Toggle selected
if (click && ctrl && !shift && !alt) {
SelectRow(row,true,!IsInSelection(row,0));
bool isSel = IsInSelection(row,0);
if (isSel && selection.size() == 1) return;
SelectRow(row,true,!isSel);
if (dlg == GetActiveLine()) {
SetActiveLine(GetDialogue(GetFirstSelRow()));
}