From 737d6b31a30ed1ee5d772797d3a2214e557e2fb7 Mon Sep 17 00:00:00 2001 From: stefan <stefan@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Tue, 11 May 2010 16:12:42 +0000 Subject: [PATCH] New SequenceViewer fixed newline handling git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2246 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/gui/src/sequence/sequence_viewer.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/gui/src/sequence/sequence_viewer.cc b/modules/gui/src/sequence/sequence_viewer.cc index 552e856e9..0b3a99e26 100644 --- a/modules/gui/src/sequence/sequence_viewer.cc +++ b/modules/gui/src/sequence/sequence_viewer.cc @@ -203,8 +203,12 @@ void SequenceViewerV2::CopyEvent(QKeyEvent* event) rows.insert(list[i].row()); } + bool first_row = true; for(int i = 0; i < model_->rowCount(); i++){ if(rows.contains(i)){ + if(!first_row){ + clipboard_string.append("\n"); + } for(int j=min_col; j<=max_col; j++){ const QModelIndex& index = model_->index(i,j); if(model->isSelected(index)){ @@ -214,7 +218,7 @@ void SequenceViewerV2::CopyEvent(QKeyEvent* event) clipboard_string.append('-'); } } - clipboard_string.append("\n"); + first_row = false; } } QApplication::clipboard()->setText(clipboard_string); -- GitLab