text
stringlengths 0
14.1k
|
---|
{ |
L->undoStack()->push( cmd ); // push takes owneship -> no need for cmd to be a smart ptr |
if ( cmd->hasError() ) |
return false; |
mModified = true; |
return true; |
} |
bool QgsVectorLayerEditPassthrough::addFeature( QgsFeature &f ) |
{ |
QgsVectorLayerUndoPassthroughCommandAddFeatures *cmd = new QgsVectorLayerUndoPassthroughCommandAddFeatures( this, QgsFeatureList() << f ); |
if ( !modify( cmd ) ) // modify takes owneship -> no need for cmd to be a smart ptr |
return false; |
const QgsFeatureList features = cmd->features(); |
f = features.at( features.count() - 1 ); |
return true; |
} |
bool QgsVectorLayerEditPassthrough::addFeatures( QgsFeatureList &features ) |
{ |
QgsVectorLayerUndoPassthroughCommandAddFeatures *cmd = new QgsVectorLayerUndoPassthroughCommandAddFeatures( this, features ); |
if ( !modify( cmd ) ) // modify takes owneship -> no need for cmd to be a smart ptr |
return false; |
features = cmd->features(); |
return true; |
} |
bool QgsVectorLayerEditPassthrough::deleteFeature( QgsFeatureId fid ) |
{ |
return modify( new QgsVectorLayerUndoPassthroughCommandDeleteFeatures( this, QgsFeatureIds() << fid ) ); |
} |
bool QgsVectorLayerEditPassthrough::deleteFeatures( const QgsFeatureIds &fids ) |
{ |
return modify( new QgsVectorLayerUndoPassthroughCommandDeleteFeatures( this, fids ) ); |
} |
bool QgsVectorLayerEditPassthrough::changeGeometry( QgsFeatureId fid, const QgsGeometry &geom ) |
{ |
return modify( new QgsVectorLayerUndoPassthroughCommandChangeGeometry( this, fid, geom ) ); |
} |
bool QgsVectorLayerEditPassthrough::changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &/*oldValue*/ ) |
{ |
return modify( new QgsVectorLayerUndoPassthroughCommandChangeAttribute( this, fid, field, newValue ) ); |
} |
bool QgsVectorLayerEditPassthrough::addAttribute( const QgsField &field ) |
{ |
return modify( new QgsVectorLayerUndoPassthroughCommandAddAttribute( this, field ) ); |
} |
bool QgsVectorLayerEditPassthrough::deleteAttribute( int attr ) |
{ |
return modify( new QgsVectorLayerUndoPassthroughCommandDeleteAttribute( this, attr ) ); |
} |
bool QgsVectorLayerEditPassthrough::renameAttribute( int attr, const QString &newName ) |
{ |
return modify( new QgsVectorLayerUndoPassthroughCommandRenameAttribute( this, attr, newName ) ); |
} |
bool QgsVectorLayerEditPassthrough::commitChanges( QStringList & /*commitErrors*/ ) |
{ |
mModified = false; |
return true; |
} |
void QgsVectorLayerEditPassthrough::rollBack() |
{ |
mModified = false; |
} |
" gpl-2.0 |
chinhlv91/wp_melano wp-content/themes/wp_melano_3.8/woocommerce/wishlist.php 8715 "<?php |
/** |
* Wishlist page template |
* |
* @author Your Inspiration Themes |
* @package YITH WooCommerce Wishlist |
* @version 1.0.6 |
*/ |
global $wpdb, $yith_wcwl, $woocommerce, $ct_catalog_mode; |
$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); |
$myaccount_page_url = """"; |
if ( $myaccount_page_id ) { |
$myaccount_page_url = get_permalink( $myaccount_page_id ); |
} |
$user_id = """"; |
if( isset( $_GET['user_id'] ) && !empty( $_GET['user_id'] ) ) { |
$user_id = $_GET['user_id']; |
} elseif( is_user_logged_in() ) { |
$user_id = get_current_user_id(); |
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.