2022-12-13 Fred Gleason <fredg@paravelsystems.com>

* Added logic to the 'Edit Voice Track Marker' dialog in rdlogedit(1)
	to prevent entry of an empty comment.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2022-12-13 17:02:13 -05:00
parent 46f3176096
commit 34ffe4130d
3 changed files with 15 additions and 0 deletions

View File

@ -23807,3 +23807,6 @@
2022-12-13 Fred Gleason <fredg@paravelsystems.com>
* Added logic to the 'Edit Log Chain' dialog in rdlogedit(1) to
prevent entry of an empty log name.
2022-12-13 Fred Gleason <fredg@paravelsystems.com>
* Added logic to the 'Edit Voice Track Marker' dialog in rdlogedit(1)
to prevent entry of an empty comment.

View File

@ -40,6 +40,8 @@ EditTrack::EditTrack(QWidget *parent)
QLabel *label=new QLabel(tr("Comment"),this);
label->setFont(labelFont());
label->setGeometry(12,100,70,14);
connect(edit_comment_edit,SIGNAL(textChanged(const QString &)),
this,SLOT(commentChangedData(const QString &)));
}
@ -59,11 +61,18 @@ int EditTrack::exec(RDLogLine *ll)
{
setLogLine(ll);
edit_comment_edit->setText(logLine()->markerComment());
commentChangedData(edit_comment_edit->text());
return EditEvent::exec();
}
void EditTrack::commentChangedData(const QString &str)
{
setOkEnabled(!str.trimmed().isEmpty());
}
bool EditTrack::saveData()
{
logLine()->setMarkerComment(edit_comment_edit->text());

View File

@ -36,6 +36,9 @@ class EditTrack : public EditEvent
public slots:
int exec(RDLogLine *ll);
private slots:
void commentChangedData(const QString &str);
protected:
bool saveData();