Skip to content
Snippets Groups Projects
Commit 737d6b31 authored by stefan's avatar stefan
Browse files

New SequenceViewer fixed newline handling

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2246 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 32338f98
No related branches found
No related tags found
No related merge requests found
...@@ -203,8 +203,12 @@ void SequenceViewerV2::CopyEvent(QKeyEvent* event) ...@@ -203,8 +203,12 @@ void SequenceViewerV2::CopyEvent(QKeyEvent* event)
rows.insert(list[i].row()); rows.insert(list[i].row());
} }
bool first_row = true;
for(int i = 0; i < model_->rowCount(); i++){ for(int i = 0; i < model_->rowCount(); i++){
if(rows.contains(i)){ if(rows.contains(i)){
if(!first_row){
clipboard_string.append("\n");
}
for(int j=min_col; j<=max_col; j++){ for(int j=min_col; j<=max_col; j++){
const QModelIndex& index = model_->index(i,j); const QModelIndex& index = model_->index(i,j);
if(model->isSelected(index)){ if(model->isSelected(index)){
...@@ -214,7 +218,7 @@ void SequenceViewerV2::CopyEvent(QKeyEvent* event) ...@@ -214,7 +218,7 @@ void SequenceViewerV2::CopyEvent(QKeyEvent* event)
clipboard_string.append('-'); clipboard_string.append('-');
} }
} }
clipboard_string.append("\n"); first_row = false;
} }
} }
QApplication::clipboard()->setText(clipboard_string); QApplication::clipboard()->setText(clipboard_string);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment