Removed help tooltip for splits (#1728)

This commit is contained in:
Paweł 2020-06-14 12:39:17 +02:00 committed by GitHub
parent 666b577bd5
commit 5e0ac814cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 35 deletions

View file

@ -676,40 +676,6 @@ void SplitHeader::mousePressEvent(QMouseEvent *event)
void SplitHeader::mouseReleaseEvent(QMouseEvent *event) void SplitHeader::mouseReleaseEvent(QMouseEvent *event)
{ {
if (this->dragging_ && event->button() == Qt::LeftButton)
{
auto pos = event->globalPos();
if (!showingHelpTooltip_)
{
this->showingHelpTooltip_ = true;
QTimer::singleShot(400, this, [this, pos] {
if (this->doubleClicked_)
{
this->doubleClicked_ = false;
this->showingHelpTooltip_ = false;
return;
}
auto tooltip = new TooltipWidget();
tooltip->setText("Double click or press <Ctrl+R> to change the "
"channel.\nClick and "
"drag to move the split.");
tooltip->setAttribute(Qt::WA_DeleteOnClose);
tooltip->move(pos);
tooltip->show();
tooltip->raise();
QTimer::singleShot(3000, tooltip, [this, tooltip] {
tooltip->close();
this->showingHelpTooltip_ = false;
});
});
}
}
this->dragging_ = false; this->dragging_ = false;
} }

View file

@ -66,7 +66,6 @@ private:
QPoint dragStart_{}; QPoint dragStart_{};
bool dragging_{false}; bool dragging_{false};
bool doubleClicked_{false}; bool doubleClicked_{false};
bool showingHelpTooltip_{false};
bool menuVisible_{false}; bool menuVisible_{false};
// signals // signals