ensure, cursor is never NULL when painting it in paintEvent()

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2021 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2009-02-12 22:53:07 +00:00
parent a4ba618828
commit 84f3ecf76b
2 changed files with 8 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
2009-02-12 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/gui/piano_roll.cpp:
ensure, cursor is never NULL when painting it in paintEvent()
* src/core/sample_buffer.cpp:
do not load samples bigger than 100 MB (closes #2458375)

View File

@@ -2,7 +2,7 @@
* piano_roll.cpp - implementation of piano-roll which is used for actual
* writing of melodies
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008 Andrew Kelley <superjoe30/at/gmail/dot/com>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -2864,11 +2864,13 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
break;
case ModeErase: cursor = s_toolErase; break;
case ModeSelect: cursor = s_toolSelect; break;
//case ModeMove: cursor = s_toolMove; break;
case ModeOpen: cursor = s_toolOpen; break;
}
p.drawPixmap( mapFromGlobal( QCursor::pos() ) + QPoint( 8, 8 ),
if( cursor != NULL )
{
p.drawPixmap( mapFromGlobal( QCursor::pos() ) + QPoint( 8, 8 ),
*cursor );
}
}