@@ -426,13 +426,7 @@ void DiscoverFrame::onDeviceDoubleClick(wxDataViewEvent &event)
426
426
return ;
427
427
}
428
428
429
- const auto manufacturer = device_list_->GetTextValue (row, 1 );
430
- if (manufacturer == ROBOCEPTION || manufacturer == KUKA)
431
- {
432
- const auto ip_wxstring = device_list_->GetTextValue (
433
- static_cast <unsigned int >(row), 4 );
434
- wxLaunchDefaultBrowser (" http://" + ip_wxstring + " /" );
435
- }
429
+ openWebGUI (row);
436
430
}
437
431
438
432
void DiscoverFrame::onDataViewContextMenu (wxDataViewEvent &event)
@@ -521,10 +515,7 @@ void DiscoverFrame::onOpenWebGUI(wxMenuEvent &)
521
515
return ;
522
516
}
523
517
524
- const auto ip_wxstring = device_list_->GetTextValue (
525
- static_cast <unsigned int >(menu_event_item_->first ),
526
- 3 );
527
- wxLaunchDefaultBrowser (" http://" + ip_wxstring + " /" );
518
+ openWebGUI (menu_event_item_->first );
528
519
}
529
520
530
521
void DiscoverFrame::onResetContextMenu (wxMenuEvent &)
@@ -625,5 +616,16 @@ void DiscoverFrame::openReconnectDialog(const int row)
625
616
reconnect_dialog_->Show ();
626
617
}
627
618
619
+ void DiscoverFrame::openWebGUI (int row)
620
+ {
621
+ const auto manufacturer = device_list_->GetTextValue (row, 1 );
622
+ if (manufacturer == ROBOCEPTION || manufacturer == KUKA)
623
+ {
624
+ const auto ip_wxstring = device_list_->GetTextValue (
625
+ static_cast <unsigned int >(row), 4 );
626
+ wxLaunchDefaultBrowser (" http://" + ip_wxstring + " /" );
627
+ }
628
+ }
629
+
628
630
BEGIN_EVENT_TABLE (DiscoverFrame, wxFrame)
629
631
END_EVENT_TABLE()
0 commit comments