mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-11 09:40:42 +00:00
Stop StatusBar timer after showing the tooltip
This commit is contained in:
parent
c6a5982c26
commit
b275c24793
@ -424,20 +424,17 @@ private:
|
||||
class StatusBar::CustomizedTipWindow : public ui::TipWindow {
|
||||
public:
|
||||
CustomizedTipWindow(const std::string& text)
|
||||
: ui::TipWindow(text)
|
||||
{
|
||||
: ui::TipWindow(text) {
|
||||
}
|
||||
|
||||
void setInterval(int msecs)
|
||||
{
|
||||
void setInterval(int msecs) {
|
||||
if (!m_timer)
|
||||
m_timer.reset(new ui::Timer(msecs, this));
|
||||
else
|
||||
m_timer->setInterval(msecs);
|
||||
}
|
||||
|
||||
void startTimer()
|
||||
{
|
||||
void startTimer() {
|
||||
m_timer->start();
|
||||
}
|
||||
|
||||
@ -445,7 +442,8 @@ protected:
|
||||
bool onProcessMessage(Message* msg) override {
|
||||
switch (msg->type()) {
|
||||
case kTimerMessage:
|
||||
closeWindow(NULL);
|
||||
closeWindow(nullptr);
|
||||
m_timer->stop();
|
||||
break;
|
||||
}
|
||||
return ui::TipWindow::onProcessMessage(msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user