Prior to merging from top into my RPM branch this code always worked.
Code: Select all
void MainWindow::updateDirtyIndicator( FileDetails dtls )
{
qDebug() << "updatedirtyIndicator called\n";
for ( int jjj=0; jjj < m_tabWidget->count(); ++jjj )
{
EdtEditWidget *ptr = static_cast<EdtEditWidget *>( m_tabWidget->widget( jjj ) );
if ( ptr && dtls.sameFile( ptr->editor()->fileDetails() ) )
{
QPalette palette;
if ( dtls.isDirty() )
{
qDebug() << "setting tab text red\n";
m_tabWidget->tabBar()->setTabTextColor( jjj, Qt::red );
}
else
{
m_tabWidget->tabBar()->setTabTextColor( jjj, palette.color( QPalette::Foreground ) );
}
}
}
}
Anybody else have CopperSpice from that point in time having the same issue?
It's like someone "optimized" and setting the text color for the tab no longer redraws the text. I don't see anything in the doc about this change.
https://www.copperspice.com/docs/cs_api/class_qtabbar.html#aa29d189c00bbf535b4a7087beef9caf9
Do I need to force this now? Get a copy of the text, set the color, then set the text?