Don't allow deselection of the only selected line
Originally committed to SVN as r4617.
This commit is contained in:
parent
11b30c8bb4
commit
7c4bf32566
1 changed files with 3 additions and 1 deletions
|
@ -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()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue