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

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

View File

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