From 0085b0aa700f10590547021fa817a7efd98aa8ff Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 30 Oct 2006 23:18:07 +0000 Subject: [PATCH] several bug-fixes git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@420 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 20 ++++++++++++++++++++ TODO | 1 - configure.in | 4 ++-- src/core/file_browser.cpp | 2 +- src/core/piano_roll.cpp | 12 +++++++----- src/lib/string_pair_drag.cpp | 4 ++-- src/tracks/pattern.cpp | 1 + 7 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5fbe620f..8f78a779f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2006-10-30 Tobias Doerffel + + * src/lib/string_pair_drag.cpp: + when decoding value of stringPairDrag-class use everything after ":" + instead of first section as the value (string) itself might contain + ":"-characters - makes it possible to drag'n'drop instrument-tracks + with VeSTige-instrument and avoids crash + + * src/core/piano_roll.cpp: + when checking cursor-position in edit-mode (move/resize note), do + comparisons in pixels instead of tact64th - fixes bug that 32th- and + 64th-notes could not be resized + + * src/core/file_browser.cpp: + also recognize "mmpz"-files as projects and load them when + double-clicking them + + * src/tracks/pattern.cpp: + when loading pattern, check type afterwards and correct if neccessary + 2006-10-09 Mikael Freeman * data/locale/sv.ts: diff --git a/TODO b/TODO index d233384a0..2092b75ab 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ - lock m_instrument in instrumentTrack-class for not crashing when using m_instrument in notePlayHandle::supportsParallelizing() while instrument is being deleted or so - try to make vestige-plugin-dlls relative - do song-editor-tempo-connection to vst-plugin inside remoteVSTPlugin -- do not duplicate recorded notes when clicking on them - add/remove-steps button in bb-editor for adding/removing according number of steps to/from all patterns of visible beat/baseline - replace rest of wizard by simple directory-selection-dialog for working-dir when running the first time - correctly load steps/dots from FLP-files diff --git a/configure.in b/configure.in index a8f28ccaa..9db7a44a1 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.2.1-svn20061008, lmms-devel/at/lists/dot/sf/dot/net) -AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20061008) +AC_INIT(lmms, 0.2.1-svn20061030, lmms-devel/at/lists/dot/sf/dot/net) +AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20061030) AM_CONFIG_HEADER(config.h) diff --git a/src/core/file_browser.cpp b/src/core/file_browser.cpp index 752f6d9bd..d9cec9184 100644 --- a/src/core/file_browser.cpp +++ b/src/core/file_browser.cpp @@ -911,7 +911,7 @@ void fileItem::determineFileType( void ) #else QString ext = QFileInfo( fullName() ).extension( FALSE ).toLower(); #endif - if( ext == "mmp" || ext == "mpt" ) + if( ext == "mmp" || ext == "mpt" || ext == "mmpz" ) { m_type = PROJECT_FILE; } diff --git a/src/core/piano_roll.cpp b/src/core/piano_roll.cpp index 57d7addfa..838286b08 100644 --- a/src/core/piano_roll.cpp +++ b/src/core/piano_roll.cpp @@ -102,7 +102,7 @@ const int PR_BOTTOM_MARGIN = SCROLLBAR_SIZE; const int PR_TOP_MARGIN = 48; // width of area used for resizing (the grip at the end of a note) -const int RESIZE_AREA_WIDTH = 3; +const int RESIZE_AREA_WIDTH = 4; // width of line for setting volume/panning of note const int NE_LINE_WIDTH = 3; @@ -1350,8 +1350,9 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me ) m_currentNote = *it; // clicked at the "tail" of the note? - if( pos_tact_64th > m_currentNote->pos() + - m_currentNote->length() - + if( pos_tact_64th*m_ppt/64 > + ( m_currentNote->pos() + + m_currentNote->length() )*m_ppt/64 - RESIZE_AREA_WIDTH && m_currentNote->length() > 0 ) { @@ -1684,8 +1685,9 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me ) } // cursor at the "tail" of the note? else if( ( *it )->length() > 0 && - pos_tact_64th > ( *it )->pos() + - ( *it )->length() - + pos_tact_64th*m_ppt/64 > + ( ( *it )->pos() + + ( *it )->length() )*m_ppt/64 - RESIZE_AREA_WIDTH ) { if( QApplication::overrideCursor() ) diff --git a/src/lib/string_pair_drag.cpp b/src/lib/string_pair_drag.cpp index 6c96598a3..498ccfe62 100644 --- a/src/lib/string_pair_drag.cpp +++ b/src/lib/string_pair_drag.cpp @@ -122,10 +122,10 @@ QString stringPairDrag::decodeValue( QDropEvent * _de ) { #ifdef QT4 return( QString( _de->mimeData()->data( "lmms/stringpair" - ) ).section( ':', 1, 1 ) ); + ) ).section( ':', 1, -1 ) ); #else return( QString( _de->encodedData( "lmms/stringpair" ) ).section( - ':', 1, 1 ) ); + ':', 1, -1 ) ); #endif } diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp index 8773c8f19..fe44021db 100644 --- a/src/tracks/pattern.cpp +++ b/src/tracks/pattern.cpp @@ -488,6 +488,7 @@ void pattern::loadSettings( const QDomElement & _this ) } ensureBeatNotes(); + checkType(); /* if( _this.attribute( "frozen" ).toInt() ) { freeze();