Commit e2031931 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Fix segfault from previous commit, and read from the config only once and simplify.

parent ef26e8ea
......@@ -56,19 +56,25 @@ void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m )
assert( model ); /* We need a model */
/* No parent, should be the main one */
/* No parent, should be the 2 main ones */
if( parentItem == NULL )
{
i_showflags = model->shownFlags();
if( model->i_depth == DEPTH_SEL ) /* Selector Panel */
{
item_col_strings.append( "" );
}
else
{
i_showflags = config_GetInt( model->p_intf, "qt-pl-showflags" );
updateColumnHeaders();
}
}
else
{
i_showflags = parentItem->i_showflags;
//Add empty string and update() handles data appending
item_col_strings.append( "" );
}
msg_Dbg( model->p_intf, "PLItem created of type: %i", model->i_depth );
}
/*
......@@ -97,12 +103,6 @@ void PLItem::updateColumnHeaders()
{
item_col_strings.clear();
if( model->i_depth == DEPTH_SEL ) /* Selector Panel */
{
item_col_strings.append( "" );
return;
}
for( int i_index=1; i_index <= VLC_META_ENGINE_ART_URL; i_index *= 2 )
{
if( i_showflags & i_index )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment