Hide previous results before capturing new
This commit is contained in:
parent
ff19f87b44
commit
9ea8974108
@ -14,6 +14,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QNetworkProxy>
|
#include <QNetworkProxy>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -242,6 +243,12 @@ void Manager::repeatCapture()
|
|||||||
void Manager::captureLocked()
|
void Manager::captureLocked()
|
||||||
{
|
{
|
||||||
SOFT_ASSERT(capturer_, return );
|
SOFT_ASSERT(capturer_, return );
|
||||||
|
|
||||||
|
if (representer_->isVisible()) {
|
||||||
|
representer_->hide();
|
||||||
|
QThread::usleep(300'000);
|
||||||
|
}
|
||||||
|
|
||||||
capturer_->captureLocked();
|
capturer_->captureLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,17 @@ void Representer::represent(const TaskPtr &task)
|
|||||||
showWidget(task);
|
showWidget(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Representer::isVisible() const
|
||||||
|
{
|
||||||
|
return widget_ && widget_->isVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Representer::hide()
|
||||||
|
{
|
||||||
|
if (widget_)
|
||||||
|
widget_->hide();
|
||||||
|
}
|
||||||
|
|
||||||
void Representer::updateSettings()
|
void Representer::updateSettings()
|
||||||
{
|
{
|
||||||
if (widget_)
|
if (widget_)
|
||||||
|
@ -16,6 +16,8 @@ public:
|
|||||||
void showLast();
|
void showLast();
|
||||||
void clipboardLast();
|
void clipboardLast();
|
||||||
void represent(const TaskPtr &task);
|
void represent(const TaskPtr &task);
|
||||||
|
bool isVisible() const;
|
||||||
|
void hide();
|
||||||
void updateSettings();
|
void updateSettings();
|
||||||
|
|
||||||
void clipboardText(const TaskPtr &task);
|
void clipboardText(const TaskPtr &task);
|
||||||
|
Loading…
Reference in New Issue
Block a user