Fix a crash when clicking ok in the configure decoration dialog.

svn path=/trunk/KDE/kdebase/workspace/; revision=1077309
This commit is contained in:
Martin Gräßlin 2010-01-19 22:28:53 +00:00
parent 923d1a3778
commit ba25fe8ce3

View file

@ -131,8 +131,10 @@ void DecorationDelegate::slotConfigure()
new KWinDecorationConfigDialog( name, borderSizes, size, m_itemView );
if( configDialog->exec() == KDialog::Accepted )
{
static_cast< DecorationModel* >( itemView()->model() )->setBorderSize( index, configDialog->borderSize() );
static_cast< DecorationModel* >( itemView()->model() )->regeneratePreview( focusedIndex() );
DecorationModel* model = static_cast< DecorationModel* >(
static_cast< QSortFilterProxyModel* >( itemView()->model() )->sourceModel() );
model->setBorderSize( index, configDialog->borderSize() );
model->regeneratePreview( focusedIndex() );
}
delete configDialog;