mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -05:00
Better tooltip handling for Windows
This commit is contained in:
parent
72a37e16d3
commit
f377d46467
@ -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("");
|
||||||
}
|
}
|
||||||
|
@ -58,5 +58,6 @@ protected:
|
|||||||
unsigned int lastBandwidth;
|
unsigned int lastBandwidth;
|
||||||
|
|
||||||
bool isView;
|
bool isView;
|
||||||
|
std::string lastToolTip;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user