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();
}
Beispiel #2
0
bool Element::isTask() const
{
	return assetType().isTask();
}