void EditAssetTypeDialog::accept() { if( mTypeName->text().isEmpty() ) { ResinError::nameEmpty( this, "Asset Type" ); return; } AssetType cur = AssetType::recordByName( mTypeName->text() ); if( cur.isRecord() && cur.key() != mAssetType.key() ) { ResinError::nameTaken( this, mTypeName->text() ); return; } assetType(); QDialog::accept(); }
bool Element::isTask() const { return assetType().isTask(); }