Handled null cursor correctly in wxQt SetCursor()

Make passing invalid wxCursor object to SetCursor() work and reset any
previously specified cursor.

Closes https://github.com/wxWidgets/wxWidgets/pull/1197
This commit is contained in:
phowstan
2019-01-30 11:13:03 +00:00
committed by Vadim Zeitlin
parent 0183b47a45
commit e831703aae

View File

@@ -518,7 +518,10 @@ bool wxWindowQt::SetCursor( const wxCursor &cursor )
if (!wxWindowBase::SetCursor(cursor))
return false;
GetHandle()->setCursor(cursor.GetHandle());
if ( cursor.IsOk() )
GetHandle()->setCursor(cursor.GetHandle());
else
GetHandle()->unsetCursor();
return true;
}