2014-11-01 Fred Gleason <fredg@paravelsystems.com>

* Modified 'rdlogedit/edit_log.cpp' so as to retain external data
	attributes only when pasting from a 'cut' operation.
This commit is contained in:
Fred Gleason 2014-11-01 20:16:41 -04:00
parent eb6227b69e
commit 201e94b9ec
3 changed files with 26 additions and 12 deletions

View File

@ -14624,3 +14624,6 @@
2014-11-01 Fred Gleason <fredg@paravelsystems.com>
* Changed policy in 'rdlogedit/edit_log.cpp' so that pasted events
retain external data attributes.
2014-11-01 Fred Gleason <fredg@paravelsystems.com>
* Modified 'rdlogedit/edit_log.cpp' so as to retain external data
attributes only when pasting from a 'cut' operation.

View File

@ -954,7 +954,7 @@ void EditLog::downButtonData()
void EditLog::cutButtonData()
{
copyButtonData();
LoadClipboard(false);
deleteButtonData();
UpdateTracks();
UpdateSelection();
@ -963,17 +963,7 @@ void EditLog::cutButtonData()
void EditLog::copyButtonData()
{
QListViewItem *next=edit_log_list->firstChild();
edit_clipboard->clear();
while(next!=NULL) {
if((edit_log_list->isSelected(next))&&
(next->text(12).toInt()!=END_MARKER_ID)) {
edit_clipboard->
push_back(*edit_log_event->logLine(next->text(13).toInt()));
}
next=next->nextSibling();
}
LoadClipboard(true);
}
@ -991,6 +981,7 @@ void EditLog::pasteButtonData()
*edit_log_event->logLine(line+i)=edit_clipboard->at(i);
// edit_log_event->logLine(line+i)->clearExternalData();
edit_log_event->logLine(line+i)->setSource(RDLogLine::Manual);
edit_clipboard->at(i).clearExternalData();
}
edit_changed=true;
RefreshList();
@ -1743,3 +1734,22 @@ bool EditLog::DeleteTracks()
}
return true;
}
void EditLog::LoadClipboard(bool clear_ext)
{
QListViewItem *next=edit_log_list->firstChild();
edit_clipboard->clear();
while(next!=NULL) {
if((edit_log_list->isSelected(next))&&
(next->text(12).toInt()!=END_MARKER_ID)) {
edit_clipboard->
push_back(*edit_log_event->logLine(next->text(13).toInt()));
if(clear_ext) {
edit_clipboard->back().clearExternalData();
}
}
next=next->nextSibling();
}
}

View File

@ -102,6 +102,7 @@ class EditLog : public QDialog
void UpdateTracks();
bool DeleteTracks();
bool ValidateSvc();
void LoadClipboard(bool clear_ext);
RDListViewItem *SingleSelection();
RDLog *edit_log;
RDLogEvent *edit_log_event;