From 4ee31e1698dc9e60938d326a0a1f61203791b912 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Wed, 28 Nov 2018 16:51:44 -0500 Subject: [PATCH 1/2] Clip video rectangle so when aspect ratio is adjusted, the image is not larger than the containing (window) rectagle. --- src/FlightDisplay/FlightDisplayViewUVC.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FlightDisplay/FlightDisplayViewUVC.qml b/src/FlightDisplay/FlightDisplayViewUVC.qml index 2670e43..3bbd3ff 100644 --- a/src/FlightDisplay/FlightDisplayViewUVC.qml +++ b/src/FlightDisplay/FlightDisplayViewUVC.qml @@ -16,8 +16,9 @@ Rectangle { id: _root width: parent.width height: parent.height - anchors.centerIn: parent color: Qt.rgba(0,0,0,0.75) + clip: true + anchors.centerIn: parent function adjustAspectRatio() { From 17260d9993114f7930c55d9916d039664c665da9 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Wed, 28 Nov 2018 16:52:10 -0500 Subject: [PATCH 2/2] Check the proper place to see if a saved video source is no longer available. --- src/Settings/VideoSettings.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Settings/VideoSettings.cc b/src/Settings/VideoSettings.cc index 0fdd43d..48430a6 100644 --- a/src/Settings/VideoSettings.cc +++ b/src/Settings/VideoSettings.cc @@ -90,7 +90,7 @@ DECLARE_SETTINGSFACT_NO_FUNC(VideoSettings, videoSource) if (!_videoSourceFact) { _videoSourceFact = _createSettingsFact(videoSourceName); //-- Check for sources no longer available - if(!_nameToMetaDataMap.contains(_videoSourceFact->rawValue().toString())) { + if(!_videoSourceFact->enumStrings().contains(_videoSourceFact->rawValue().toString())) { if (_noVideo) { _videoSourceFact->setRawValue(videoSourceNoVideo); } else {