void CXmlPropertyList::resetProperty() { if ( !currentItem() ) return; PropertyItem *i = (PropertyItem*)currentItem(); if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) ) return; QString pn( tr( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), editor->widget(), editor, i->name(), i->value(), WidgetFactory::defaultValue( editor->widget(), i->name() ), WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ), i->currentItem(), TRUE ); cmd->execute(); editor->formWindow()->commandHistory()->addCommand( cmd, FALSE ); if ( i->hasSubItems() ) i->initChildren(); }