mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6258 Update RimViewWindow to work with new tag system for tree view items
This commit is contained in:
@@ -335,10 +335,13 @@ void RimViewWindow::defineObjectEditorAttribute( QString uiConfigName, caf::PdmU
|
||||
caf::PdmUiTreeViewItemAttribute* treeItemAttribute = dynamic_cast<caf::PdmUiTreeViewItemAttribute*>( attribute );
|
||||
if ( treeItemAttribute && RiaApplication::instance()->preferences()->showViewIdInProjectTree() && id() >= 0 )
|
||||
{
|
||||
treeItemAttribute->tag = QString( "%1" ).arg( id() );
|
||||
treeItemAttribute->tags.clear();
|
||||
caf::PdmUiTreeViewItemAttribute::Tag tag;
|
||||
tag.text = QString( "%1" ).arg( id() );
|
||||
cvf::Color3f viewColor = RiaColorTables::contrastCategoryPaletteColors().cycledColor3f( (size_t)id() );
|
||||
cvf::Color3f viewTextColor = RiaColorTools::contrastColor( viewColor );
|
||||
treeItemAttribute->bgColor = QColor( RiaColorTools::toQColor( viewColor ) );
|
||||
treeItemAttribute->fgColor = QColor( RiaColorTools::toQColor( viewTextColor ) );
|
||||
tag.bgColor = QColor( RiaColorTools::toQColor( viewColor ) );
|
||||
tag.fgColor = QColor( RiaColorTools::toQColor( viewTextColor ) );
|
||||
treeItemAttribute->tags.push_back( tag );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user