diff --git a/ChangeLog b/ChangeLog index 5d05e910..600aaa2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22532,3 +22532,7 @@ platform styling hints. * Modified the marker readouts in rdlibrary(1) so as to better respect platform styling hints. +2021-10-26 Fred Gleason + * Fixed a regression in rdairplay(1) that caused the 'shadow' of the + Button Log events to fail to be reflected in the 'Main Log' Full Log + widget. diff --git a/lib/rdlogplay.cpp b/lib/rdlogplay.cpp index 19be8af5..0de8cd6c 100644 --- a/lib/rdlogplay.cpp +++ b/lib/rdlogplay.cpp @@ -63,6 +63,7 @@ RDLogPlay::RDLogPlay(int id,RDEventPlayer *player,QObject *parent) play_rescan_pos=0; play_refreshable=false; play_audition_preroll=rda->airplayConf()->auditionPreroll(); + play_slot_quantity=1; for(int i=0;i roles; + roles.push_back(Qt::BackgroundRole); + emit dataChanged(createIndex(play_next_line,0), + createIndex(play_next_line+play_slot_quantity-1,columnCount()),roles); + } +} + + void RDLogPlay::transTimerData() { int lines[TRANSPORT_QUANTITY]; @@ -1846,7 +1859,8 @@ QColor RDLogPlay::rowBackgroundColor(int row,RDLogLine *ll) const return LOG_ERROR_COLOR; } else { - if((play_next_line>=0)&&(play_next_line==row)) { + if((play_next_line>=0)&&(play_slot_quantity>0)&& + (row>=play_next_line)&&(row<(play_next_line+play_slot_quantity-1))) { if(ll->evergreen()) { return LOG_EVERGREEN_COLOR; } @@ -2839,7 +2853,8 @@ void RDLogPlay::ChangeTransport() emit transportChanged(); if(play_next_line>=0) { emit dataChanged(createIndex(play_next_line,0), - createIndex(play_next_line+6,columnCount())); + createIndex(play_next_line+play_slot_quantity-1, + columnCount())); } } diff --git a/lib/rdlogplay.h b/lib/rdlogplay.h index 130f28c5..6b6aff0b 100644 --- a/lib/rdlogplay.h +++ b/lib/rdlogplay.h @@ -110,6 +110,9 @@ class RDLogPlay : public RDLogModel void resync(); bool isRefreshable() const; + public slots: + void setSlotQuantity(int slot_quan); + private slots: void transTimerData(); void graceTimerData(); @@ -253,6 +256,7 @@ class RDLogPlay : public RDLogModel RDEventPlayer *play_event_player; RDUnixSocket *play_pad_socket; bool play_hours[24]; + int play_slot_quantity; }; diff --git a/rdairplay/button_log.cpp b/rdairplay/button_log.cpp index 73f00ad4..beb1e951 100644 --- a/rdairplay/button_log.cpp +++ b/rdairplay/button_log.cpp @@ -32,6 +32,7 @@ ButtonLog::ButtonLog(RDLogPlay *log,int id,RDAirPlayConf *conf,bool allow_pause, log_action_mode=RDAirPlayConf::Normal; log_op_mode=RDAirPlayConf::LiveAssist; log_pause_enabled=allow_pause; + log_slot_quantity=0; // // Set Mappings @@ -277,6 +278,12 @@ void ButtonLog::setActionMode(RDAirPlayConf::ActionMode mode,int *cartnum) } +int ButtonLog::slotQuantity() const +{ + return log_slot_quantity; +} + + PieCounter *ButtonLog::pieCounterWidget() const { return log_pie_counter_widget; @@ -499,6 +506,7 @@ void ButtonLog::resizeEvent(QResizeEvent *e) LOGLINEBOX_FULL_HEIGHT); } + int slot_quantity=BUTTON_PLAY_BUTTONS; QRect viewport=QRect(0,0,size().width(),size().height()); for(int i=BUTTON_PLAY_BUTTONS;isetGeometry(10+85, @@ -515,6 +523,13 @@ void ButtonLog::resizeEvent(QResizeEvent *e) viewport.contains(log_start_button[i]->geometry()); log_line_box[i]->setVisible(visible); log_start_button[i]->setVisible(visible); + if(visible) { + slot_quantity++; + } + } + if(slot_quantity!=log_slot_quantity) { + log_slot_quantity=slot_quantity; + emit slotQuantityChanged(log_slot_quantity); } } diff --git a/rdairplay/button_log.h b/rdairplay/button_log.h index adcb5434..f0b94965 100644 --- a/rdairplay/button_log.h +++ b/rdairplay/button_log.h @@ -48,6 +48,7 @@ class ButtonLog : public RDWidget void setOpMode(RDAirPlayConf::OpMode mode); RDAirPlayConf::ActionMode actionMode() const; void setActionMode(RDAirPlayConf::ActionMode mode,int *cartnum=0); + int slotQuantity() const; PieCounter *pieCounterWidget() const; PostCounter *postCounterWidget() const; StopCounter *stopCounterWidget() const; @@ -74,6 +75,7 @@ class ButtonLog : public RDWidget signals: void selectClicked(int id,int line,RDLogLine::Status); void cartDropped(int id,int line,RDLogLine *ll); + void slotQuantityChanged(int slots); private: void UpdateEvents(); @@ -85,6 +87,7 @@ class ButtonLog : public RDWidget RDAirPlayConf::ActionMode log_action_mode; LogLineBox *log_line_box[BUTTON_TOTAL_BUTTONS]; StartButton *log_start_button[BUTTON_TOTAL_BUTTONS]; + int log_slot_quantity; int log_line_counter; EditEvent *log_event_edit; bool log_pause_enabled; diff --git a/rdairplay/rdairplay.cpp b/rdairplay/rdairplay.cpp index 775c72d8..539b0ac4 100644 --- a/rdairplay/rdairplay.cpp +++ b/rdairplay/rdairplay.cpp @@ -698,6 +698,8 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent) air_button_list->stopCounterWidget(),SLOT(tickCounter())); connect(air_log[0],SIGNAL(nextStopChanged(QTime)), air_button_list->stopCounterWidget(),SLOT(setTime(QTime))); + connect(air_button_list,SIGNAL(slotQuantityChanged(int)), + air_log[0],SLOT(setSlotQuantity(int))); // // Set Startup Mode