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