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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user