[libcamera-devel] [PATCH 2/2] qcam: main_window: Fix combo-box entry selection on startup
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Apr 30 17:07:41 CEST 2020
Hi Umang,
On 30/04/2020 15:15, Umang Jain wrote:
> When one of the camera is selected and opened from the
> "Select Cameras" items list, the entry of the combo-box
> in the main-window doesn't update its item index to reflect
> the camera which was earlier selected. Fix that.
Ohh - nice catch - thanks, tested with and without this patch and I see
what you mean!
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> Signed-off-by: Umang Jain <email at uajain.com>
> ---
> src/qcam/main_window.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
> index 344b7ec..fa05515 100644
> --- a/src/qcam/main_window.cpp
> +++ b/src/qcam/main_window.cpp
> @@ -249,6 +249,10 @@ int MainWindow::openCamera()
> return -EBUSY;
> }
>
> + /* Set the combo-box with the current selected Camera */
> + int camIndex = cameraCombo_->findText(QString::fromStdString(cameraName));
> + cameraCombo_->setCurrentIndex(camIndex);
> +
> return 0;
> }
>
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list