From a9bc1312c1b84351db7a0045d0cdf7871c759e0e Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 16 Nov 2020 01:34:20 +1100 Subject: [PATCH] don't show associated alpha option if footage has no alpha --- .../streamproperties/videostreamproperties.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp b/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp index b9bf9112d..f6ebfcfcc 100644 --- a/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp +++ b/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp @@ -77,11 +77,13 @@ VideoStreamProperties::VideoStreamProperties(VideoStreamPtr stream) : video_layout->addWidget(video_color_space_, row, 1); - row++; + if (stream->channel_count() == VideoParams::kRGBAChannelCount) { + row++; - video_premultiply_alpha_ = new QCheckBox(tr("Premultiplied Alpha")); - video_premultiply_alpha_->setChecked(stream_->premultiplied_alpha()); - video_layout->addWidget(video_premultiply_alpha_, row, 0, 1, 2); + video_premultiply_alpha_ = new QCheckBox(tr("Premultiplied Alpha")); + video_premultiply_alpha_->setChecked(stream_->premultiplied_alpha()); + video_layout->addWidget(video_premultiply_alpha_, row, 0, 1, 2); + } row++;