[haiku-commits] Re: haiku: hrev50495 - src/preferences/appearance src/kits/interface headers/os/interface

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Thu, 18 Aug 2016 16:48:50 -0700

Commit:      dc6233fcf45e4b58a9fa4c0abdd02aff67c23010
URL:         http://cgit.haiku-os.org/haiku/commit/?id=dc6233fcf45e
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Thu Aug 18 22:11:28 2016 UTC

BListView: Check index non-negative, not only not -1

----------------------------------------------------------------------------

diff --git a/src/kits/interface/ListView.cpp b/src/kits/interface/ListView.cpp
index 8a123ec..3f3e26d 100644
--- a/src/kits/interface/ListView.cpp
+++ b/src/kits/interface/ListView.cpp
@@ -574,7 +574,7 @@ BListView::MouseDown(BPoint where)
                fTrack->try_drag = true;
        }

-       if (index > -1) {
+       if (index >= 0) {
                if (fListType == B_MULTIPLE_SELECTION_LIST) {
                        if ((modifiers & B_SHIFT_KEY) != 0) {
                                // select entire block

this does nothing, sorry about the noise.

Other related posts: