Better tooltip handling for Windows

This commit is contained in:
Charles J. Cliffe 2016-02-09 00:28:40 -05:00
parent 72a37e16d3
commit f377d46467
2 changed files with 9 additions and 2 deletions

View File

@ -157,8 +157,14 @@ void InteractiveCanvas::OnMouseEnterWindow(wxMouseEvent& event) {
void InteractiveCanvas::setStatusText(std::string statusText) {
wxGetApp().getAppFrame()->GetStatusBar()->SetStatusText(statusText);
if (wxGetApp().getConfig()->getShowTips()) {
this->SetToolTip(statusText);
if (wxGetApp().getConfig()->getShowTips()) {
if (statusText != lastToolTip) {
wxToolTip::Enable(false);
this->SetToolTip(statusText);
lastToolTip = statusText;
wxToolTip::SetDelay(1000);
wxToolTip::Enable(true);
}
} else {
this->SetToolTip("");
}

View File

@ -58,5 +58,6 @@ protected:
unsigned int lastBandwidth;
bool isView;
std::string lastToolTip;
};