From c942383b0086a39758d12ca549ffb624bedb8492 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Thu, 19 Apr 2018 09:16:30 +0200 Subject: [PATCH] Selection fixes --- src/core/controller.cpp | 1 + src/widgets/capture/capturewidget.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/controller.cpp b/src/core/controller.cpp index cf8dce81..d13bb483 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -81,6 +81,7 @@ void Controller::createVisualCapture(const uint id, const QString &forcedSavePat m_captureWindow->show(); #else m_captureWindow->showFullScreen(); + //m_captureWindow->show(); // Debug #endif } } diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 9e3ce540..942531d8 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -503,10 +503,11 @@ void CaptureWidget::initPanel() { void CaptureWidget::initSelection() { m_selection = new SelectionWidget(m_uiColor, this); - m_selection->setVisible(false); connect(m_selection, &SelectionWidget::animationEnded, this, [this](){ this->m_buttonHandler->updatePosition(this->m_selection->geometry()); }); + m_selection->setVisible(false); + m_selection->setGeometry(QRect()); } void CaptureWidget::initWidget() { @@ -708,7 +709,9 @@ void CaptureWidget::updateCursor() { default: break; } - } else if (m_selection->geometry().contains(m_context.mousePos)) { + } else if (m_selection->isVisible() && + m_selection->geometry().contains(m_context.mousePos)) + { setCursor(Qt::OpenHandCursor); } else { setCursor(Qt::CrossCursor);