2023-11-06 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RDTrackerWidget::isActive()' method.
	* Added a 'RDTrackerWidget::activeChanged()' signal.
	* Fixed a bug in rdairplay(1) that caused a segfault when attempting
	to unload a log from the voice tracker while the tracker was active.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-11-06 12:04:45 -05:00
parent 67d1e3afd8
commit 5d3931f7cf
4 changed files with 28 additions and 0 deletions

View File

@ -24447,3 +24447,8 @@
2023-11-03 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in caed(8) that caused multiple play-outs on
a common port to interfere with each others mixer settings.
2023-11-06 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDTrackerWidget::isActive()' method.
* Added a 'RDTrackerWidget::activeChanged()' signal.
* Fixed a bug in rdairplay(1) that caused a segfault when attempting
to unload a log from the voice tracker while the tracker was active.

View File

@ -68,6 +68,7 @@ RDTrackerWidget::RDTrackerWidget(QString *import_path,QWidget *parent)
}
d_menu_clicked_point=-1;
d_shift_pressed=false;
d_active=false;
//
// Create Palettes
@ -421,6 +422,12 @@ QSizePolicy RDTrackerWidget::sizePolicy() const
}
bool RDTrackerWidget::isActive() const
{
return d_active;
}
bool RDTrackerWidget::load(const QString &logname)
{
QString username;
@ -1423,6 +1430,14 @@ void RDTrackerWidget::stateChangedData(int id,RDPlayDeck::State state)
UpdateControls();
break;
}
if((d_deck[0]->state()!=RDPlayDeck::Stopped)||
(d_deck[1]->state()!=RDPlayDeck::Stopped)||
(d_deck[2]->state()!=RDPlayDeck::Stopped)!=d_active) {
d_active=(d_deck[0]->state()!=RDPlayDeck::Stopped)||
(d_deck[1]->state()!=RDPlayDeck::Stopped)||
(d_deck[2]->state()!=RDPlayDeck::Stopped);
emit activeChanged(d_active);
}
}

View File

@ -69,6 +69,10 @@ class RDTrackerWidget : public RDWidget
~RDTrackerWidget();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
bool isActive() const;
signals:
void activeChanged(bool state);
public slots:
bool load(const QString &logname);
@ -269,6 +273,8 @@ class RDTrackerWidget : public RDWidget
QLabel *d_tracks_remaining_label_label;
QLabel *d_time_remaining_label_label;
QLabel *d_time_label;
bool d_active;
};

View File

@ -31,6 +31,8 @@ VoiceTracker::VoiceTracker(QWidget *parent)
d_load_button=new QPushButton(tr("Load\nLog"),this);
d_load_button->setFont(bigButtonFont());
connect(d_load_button,SIGNAL(clicked()),this,SLOT(loadData()));
connect(d_tracker_widget,SIGNAL(activeChanged(bool)),
d_load_button,SLOT(setDisabled(bool)));
}