diff --git a/ChangeLog b/ChangeLog index 426a42a5..48770d36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24414,3 +24414,6 @@ 2023-10-05 Fred Gleason * Clarified the entries for the 'Pause Panel' ['PU'] and 'Stop Panel' ['PT'] RMLs in the Operations Guide. +2023-10-05 Fred Gleason + * Fixed a regression in rdairplay(1) and rdpanel(1) that caused + extraneous buttons to appear when resizing the sound panel. diff --git a/lib/rdbutton_panel.cpp b/lib/rdbutton_panel.cpp index 0fac2941..0208d655 100644 --- a/lib/rdbutton_panel.cpp +++ b/lib/rdbutton_panel.cpp @@ -257,13 +257,15 @@ QString RDButtonPanel::json(int padding,bool final) const void RDButtonPanel::setVisible(bool state) { - printf("Calling RDButtonPanel::setVisible(%d) @ %p\n",state,this); RDWidget::setVisible(state); for(int i=0;isetVisible(state); } } + if(state) { + UpdateViewport(); + } } @@ -271,9 +273,9 @@ void RDButtonPanel::buttonClickedData(int id) { int pnum=id/(PANEL_MAX_BUTTON_COLUMNS*PANEL_MAX_BUTTON_ROWS); int pos=id%(PANEL_MAX_BUTTON_COLUMNS*PANEL_MAX_BUTTON_ROWS); - printf("emitting buttonClicked(%d,%d,%d)\n", - pnum,pos%PANEL_MAX_BUTTON_COLUMNS,pos/PANEL_MAX_BUTTON_COLUMNS); - emit buttonClicked(pnum,pos%PANEL_MAX_BUTTON_COLUMNS,pos/PANEL_MAX_BUTTON_COLUMNS); + + emit buttonClicked(pnum,pos%PANEL_MAX_BUTTON_COLUMNS, + pos/PANEL_MAX_BUTTON_COLUMNS); } @@ -287,6 +289,12 @@ void RDButtonPanel::resizeEvent(QResizeEvent *e) PANEL_BUTTON_SIZE_Y); } } + UpdateViewport(); +} + + +void RDButtonPanel::UpdateViewport() +{ for(int i=0;i #include diff --git a/lib/rdsound_panel.cpp b/lib/rdsound_panel.cpp index 10c0cb32..19b9639f 100644 --- a/lib/rdsound_panel.cpp +++ b/lib/rdsound_panel.cpp @@ -673,7 +673,6 @@ void RDSoundPanel::panelDown() void RDSoundPanel::panelActivatedData(int n) { - printf("panelActivatedData(%d)\n",n); QString username; if(panel_type==RDAirPlayConf::UserPanel) { username=rda->user()->name(); @@ -754,8 +753,6 @@ void RDSoundPanel::setupClickedData() void RDSoundPanel::buttonClickedData(int pnum,int col,int row) { - // printf("buttonMapperData(pnum: %d,col: %d row: %d)\n",pnum,col,row); - if(panel_current_panel==NULL) { printf("NO CURRENT PANEL!\n"); return; @@ -1300,9 +1297,7 @@ void RDSoundPanel::UpdatePanels(const QString &username) } for(int i=panel_arrays.value(username).size();isetGeometry(0,0,size().width()-5,size().height()-60); connect(panel,SIGNAL(buttonClicked(int,int,int)), this,SLOT(buttonClickedData(int,int,int))); panel->hide(); @@ -1379,7 +1374,6 @@ void RDSoundPanel::ShowPanel(RDAirPlayConf::PanelType type,int offset) if(type==RDAirPlayConf::UserPanel) { username=rda->user()->name(); } - printf("username: %s\n",username.toUtf8().constData()); if(panel_arrays.value(username).size()>offset) { if(panel_current_panel!=NULL) { panel_current_panel->hide();