mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-30 17:20:32 +01:00
2023-10-05 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdairplay(1) and rdpanel(1) that caused extraneous buttons to appear when resizing the sound panel. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -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;i<PANEL_MAX_BUTTON_ROWS;i++) {
|
||||
for(int j=0;j<PANEL_MAX_BUTTON_COLUMNS;j++) {
|
||||
panel_button[i][j]->setVisible(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<PANEL_MAX_BUTTON_ROWS;i++) {
|
||||
for(int j=0;j<PANEL_MAX_BUTTON_COLUMNS;j++) {
|
||||
RDPanelButton *button=panel_button[i][j];
|
||||
|
||||
Reference in New Issue
Block a user