Initialize line-drawer in AutomationEditor

Possible endless loop if these two state variables are not intialized.
Now a line will have the origin of (0,0) if drawn (shift-click) without
previously clicking on a starting spot.  Perhaps not the best fix, but
it works. And I think allowing this first line (instead of blocking it)
is better for the enabling the user to accidently discover the feature.

Conflicts:
	src/gui/AutomationEditor.cpp
This commit is contained in:
Paul Giblock
2012-03-23 13:21:26 -04:00
parent 2375b7f0a0
commit e5b3975b12

View File

@@ -3,6 +3,7 @@
* actual setting of dynamic values
*
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2013 Paul Giblock <pgib/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -89,6 +90,8 @@ AutomationEditor::AutomationEditor() :
m_action( NONE ),
m_moveStartLevel( 0 ),
m_moveStartTick( 0 ),
m_drawLastLevel( 0.0f ),
m_drawLastTick( 0 ),
m_ppt( DEFAULT_PPT ),
m_y_delta( DEFAULT_Y_DELTA ),
m_y_auto( TRUE ),