From e0d8f7691f1e7d8cfcb676c020aeeb2387c9baa5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 21 Jan 2003 03:10:50 +0000 Subject: [PATCH] clear the clipboard when copying and cutting --- stepmania/src/ScreenEdit.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 7e5aa85dac..31421d6594 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -998,27 +998,14 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ if( m_NoteFieldEdit.m_fBeginMarker == -1 || m_NoteFieldEdit.m_fEndMarker == -1 ) { m_soundInvalid.Play(); - } - else - { - int iFirstRow = BeatToNoteRow( m_NoteFieldEdit.m_fBeginMarker ); - int iLastRow = BeatToNoteRow( m_NoteFieldEdit.m_fEndMarker ); - - m_Clipboard.CopyRange( &m_NoteFieldEdit, iFirstRow, iLastRow ); - m_NoteFieldEdit.ClearRange( iFirstRow, iLastRow ); - } - break; - case SDLK_c: - if( m_NoteFieldEdit.m_fBeginMarker == -1 || m_NoteFieldEdit.m_fEndMarker == -1 ) - { - m_soundInvalid.Play(); - } - else - { + } else { int iFirstRow = BeatToNoteRow( m_NoteFieldEdit.m_fBeginMarker ); int iLastRow = BeatToNoteRow( m_NoteFieldEdit.m_fEndMarker ); + m_Clipboard.ClearAll(); m_Clipboard.CopyRange( &m_NoteFieldEdit, iFirstRow, iLastRow ); + if(DeviceI.button == SDLK_x) + m_NoteFieldEdit.ClearRange( iFirstRow, iLastRow ); } break; case SDLK_v: