Ticket #10716: NetworkTimeView.patch

File NetworkTimeView.patch, 831 bytes (added by dknoto, 6 years ago)
  • src/preferences/time/NetworkTimeView.cpp

    diff --git a/src/preferences/time/NetworkTimeView.cpp b/src/preferences/time/NetworkTimeView.cpp
    index c0dbfc5..3942f8f 100644
    a b NetworkTimeView::MessageReceived(BMessage* message)  
    308308            break;
    309309
    310310        case kMsgRemoveServer:
     311        {
     312            int32 currentSelection = fServerListView->CurrentSelection();
     313            if (currentSelection < 0)
     314                break;
     315
    311316            fSettings.RemoveServer(((BStringItem*)
    312                 fServerListView->ItemAt(
    313                     fServerListView->
    314                     CurrentSelection()))->Text());
     317                fServerListView->ItemAt(currentSelection))->Text());
    315318            _UpdateServerList();
    316319            Looper()->PostMessage(new BMessage(kMsgChange));
    317320            break;
    318 
     321        }
    319322        case kMsgResetServerList:
    320323            fSettings.ResetServersToDefaults();
    321324            _UpdateServerList();