From 7c4bf3256683d40beff7dee23a9b6e40a70091b6 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 27 Jun 2010 04:55:19 +0000 Subject: [PATCH] Don't allow deselection of the only selected line Originally committed to SVN as r4617. --- aegisub/src/base_grid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aegisub/src/base_grid.cpp b/aegisub/src/base_grid.cpp index 6af9ce078..ceb4c3ae3 100644 --- a/aegisub/src/base_grid.cpp +++ b/aegisub/src/base_grid.cpp @@ -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())); }