[haiku-commits] haiku: hrev54809 - src/preferences/input

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 23 Dec 2020 05:49:04 -0500 (EST)

hrev54809 adds 1 changeset to branch 'master'
old head: 6011ce6c7495e4e707bd33b12a7e22d66c710aad
new head: a0f0cb5a9da5e88c580d5610db69fbd1ae9b3b51
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=a0f0cb5a9da5+%5E6011ce6c7495

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

a0f0cb5a9da5: Input preferences: fix list item retrieval
  
  Fixes #16679
  
  Change-Id: I87844b7745dc2d9e126983a888caf01f37f6b742
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/3540
  Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>

                                    [ Máximo Castañeda <antiswen@xxxxxxxx> ]

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

Revision:    hrev54809
Commit:      a0f0cb5a9da5e88c580d5610db69fbd1ae9b3b51
URL:         https://git.haiku-os.org/haiku/commit/?id=a0f0cb5a9da5
Author:      Máximo Castañeda <antiswen@xxxxxxxx>
Date:        Sun Dec 20 20:54:13 2020 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Wed Dec 23 10:49:01 2020 UTC

Ticket:      https://dev.haiku-os.org/ticket/16679

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

1 file changed, 5 insertions(+), 5 deletions(-)
src/preferences/input/InputWindow.cpp | 10 +++++-----

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

diff --git a/src/preferences/input/InputWindow.cpp 
b/src/preferences/input/InputWindow.cpp
index 7c19ed4b60..e0536da250 100644
--- a/src/preferences/input/InputWindow.cpp
+++ b/src/preferences/input/InputWindow.cpp
@@ -113,11 +113,11 @@ InputWindow::MessageReceived(BMessage* message)
                                if (device)
                                        AddDevice(device);
                        } else {
-                               for (int i = 0; i < 
fDeviceListView->CountItems();
-                                       i++) {
-                                       BStringItem* item = 
dynamic_cast<BStringItem*>(
-                                               fDeviceListView->ItemAt(i));
-                                       if (item->Text() == name) {
+                               for (int i = 0; i < 
fDeviceListView->CountItems(); i++) {
+                                       DeviceListItemView* item =
+                                               
dynamic_cast<DeviceListItemView*>(
+                                                       
fDeviceListView->ItemAt(i));
+                                       if (item != NULL && item->Label() == 
name) {
                                                fDeviceListView->RemoveItem(i);
                                                BView* settings = 
fCardView->ChildAt(i);
                                                
fCardView->RemoveChild(settings);


Other related posts:

  • » [haiku-commits] haiku: hrev54809 - src/preferences/input - Adrien Destugues