Author: leavengood Date: 2011-06-18 06:46:37 +0200 (Sat, 18 Jun 2011) New Revision: 42231 Changeset: https://dev.haiku-os.org/changeset/42231 Ticket: https://dev.haiku-os.org/ticket/6772 Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp Log: Make the delete key clear the selection in selection mode, trash the file otherwise. Fixes #6772. Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp =================================================================== --- haiku/trunk/src/apps/showimage/ShowImageView.cpp 2011-06-18 03:42:31 UTC (rev 42230) +++ haiku/trunk/src/apps/showimage/ShowImageView.cpp 2011-06-18 04:46:37 UTC (rev 42231) @@ -1284,7 +1284,10 @@ ClearSelection(); break; case B_DELETE: - _SendMessageToWindow(kMsgDeleteCurrentFile); + if (fHasSelection) + ClearSelection(); + else + _SendMessageToWindow(kMsgDeleteCurrentFile); break; case '0': FitToBounds();