From bb0df58647d5894eb7f34295c78f34ad2994ef88 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 3 Dec 2016 07:12:44 +0100 Subject: tracker/pt: simplify pointless inheritance --- tracker-pt/ftnoir_tracker_pt_dialog.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tracker-pt/ftnoir_tracker_pt_dialog.cpp') diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp index 749ea1ff..d3951bd9 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp +++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp @@ -142,12 +142,16 @@ void TrackerDialog_PT::set_camera_settings_available(const QString& camera_name) void TrackerDialog_PT::show_camera_settings() { const int idx = ui.camdevice_combo->currentIndex(); + if (tracker) { - cv::VideoCapture* cap = tracker->camera; - if (cap && cap->isOpened()) + if (tracker->camera) { - video_property_page::show_from_capture(*cap, idx); + cv::VideoCapture& cap = *tracker->camera; + + CamInfo info; + if (tracker->camera.get_info(info)) + video_property_page::show_from_capture(cap, info.idx); } } else -- cgit v1.2.3