Skip to content
Permalink
Browse files
reverted changes added by error on merge
  • Loading branch information
domi4484 committed Jan 10, 2022
1 parent 2f703f9 commit b37f066ad650924eb35094a55e7d0075cc3de211
Showing with 44 additions and 35 deletions.
  1. +15 −15 src/app/labeling/qgsmaptoollabel.cpp
  2. +6 −1 src/app/labeling/qgsmaptoollabel.h
  3. +4 −0 src/core/labeling/qgspallabeling.cpp
  4. +19 −19 src/ui/qgstextformatwidgetbase.ui
@@ -1034,12 +1034,12 @@ QgsMapToolLabel::LabelDetails::LabelDetails( const QgsLabelPosition &p, QgsMapCa
}
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsPalIndexes &indexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsPalIndexes &indexes )
{
return createAuxiliaryFields( mCurrentLabel, indexes, overwriteExpression );
return createAuxiliaryFields( mCurrentLabel, indexes );
}

bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &indexes, bool overwriteExpression ) const
bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &indexes ) const
{
bool newAuxiliaryLayer = false;
QgsVectorLayer *vlayer = details.layer;
@@ -1070,9 +1070,9 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexe
{
index = vlayer->fields().lookupField( prop.field() );
}
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty || overwriteExpression )
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty )
{
index = QgsAuxiliaryLayer::createProperty( p, vlayer );
index = QgsAuxiliaryLayer::createProperty( p, vlayer, false );
changed = true;
}

@@ -1086,12 +1086,12 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexe
return newAuxiliaryLayer;
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsDiagramIndexes &indexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsDiagramIndexes &indexes )
{
return createAuxiliaryFields( mCurrentLabel, indexes, overwriteExpression );
return createAuxiliaryFields( mCurrentLabel, indexes );
}

bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &indexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &indexes )
{
bool newAuxiliaryLayer = false;
QgsVectorLayer *vlayer = details.layer;
@@ -1121,9 +1121,9 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIn
{
index = vlayer->fields().lookupField( prop.field() );
}
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty || overwriteExpression )
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty )
{
index = QgsAuxiliaryLayer::createProperty( p, vlayer );
index = QgsAuxiliaryLayer::createProperty( p, vlayer, false );
changed = true;
}

@@ -1135,12 +1135,12 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIn
return newAuxiliaryLayer;
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes )
{
return createAuxiliaryFields( mCurrentCallout, calloutIndexes, overwriteExpression );
return createAuxiliaryFields( mCurrentCallout, calloutIndexes );
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes )
{
bool newAuxiliaryLayer = false;
QgsVectorLayer *vlayer = qobject_cast< QgsVectorLayer * >( QgsMapTool::layer( details.layerID ) );
@@ -1171,9 +1171,9 @@ bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutPosition &details, QgsCal
{
index = vlayer->fields().lookupField( prop.field() );
}
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty || overwriteExpression )
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty )
{
index = QgsAuxiliaryLayer::createProperty( p, vlayer );
index = QgsAuxiliaryLayer::createProperty( p, vlayer, false );
changed = true;
}
calloutIndexes[p] = index;
@@ -254,7 +254,12 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapToolAdvancedDigitizing
bool createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes );
bool createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes );

bool labelMoveable( QgsVectorLayer *vlayer, const QgsPalLayerSettings &settings, int &xCol, int &yCol, int &pointCol ) const;
bool createAuxiliaryFields( QgsPalIndexes &palIndexes );
bool createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &palIndexes ) const;
bool createAuxiliaryFields( QgsDiagramIndexes &diagIndexes );
bool createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &diagIndexes );
bool createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes );
bool createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes );

void updateHoveredLabel( QgsMapMouseEvent *e );
void clearHoveredLabel();
@@ -2406,6 +2406,10 @@ std::unique_ptr<QgsLabelFeature> QgsPalLayerSettings::registerFeatureWithDetails
{
point = QgsPoint( pointAsVariant.value<QgsReferencedGeometry>().asPoint() );
}
else if ( pointAsVariant.canConvert<QgsGeometry>() )
{
point = QgsPoint( pointAsVariant.value<QgsGeometry>().asPoint() );
}
else if ( !pointAsVariant.toString().isEmpty() )
{
point.fromWkt( pointAsVariant.toString() );
@@ -109,7 +109,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>492</width>
<width>499</width>
<height>300</height>
</rect>
</property>
@@ -625,7 +625,7 @@
<item>
<widget class="QStackedWidget" name="mLabelStackedWidget">
<property name="currentIndex">
<number>7</number>
<number>0</number>
</property>
<widget class="QWidget" name="mLabelPage_Text">
<layout class="QVBoxLayout" name="verticalLayout_6">
@@ -654,8 +654,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>488</width>
<height>404</height>
<width>485</width>
<height>429</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
@@ -1217,8 +1217,8 @@ font-style: italic;</string>
<rect>
<x>0</x>
<y>0</y>
<width>467</width>
<height>866</height>
<width>471</width>
<height>742</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_42">
@@ -2131,8 +2131,8 @@ font-style: italic;</string>
<rect>
<x>0</x>
<y>0</y>
<width>488</width>
<height>404</height>
<width>299</width>
<height>308</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
@@ -2477,8 +2477,8 @@ font-style: italic;</string>
<rect>
<x>0</x>
<y>0</y>
<width>488</width>
<height>404</height>
<width>296</width>
<height>291</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_121">
@@ -2755,8 +2755,8 @@ font-style: italic;</string>
<rect>
<x>0</x>
<y>0</y>
<width>467</width>
<height>898</height>
<width>438</width>
<height>753</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_21">
@@ -3506,8 +3506,8 @@ font-style: italic;</string>
<rect>
<x>0</x>
<y>0</y>
<width>467</width>
<height>522</height>
<width>324</width>
<height>457</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_22">
@@ -4083,9 +4083,9 @@ font-style: italic;</string>
<property name="geometry">
<rect>
<x>0</x>
<y>-1272</y>
<width>467</width>
<height>1830</height>
<y>0</y>
<width>472</width>
<height>1690</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
@@ -5814,8 +5814,8 @@ font-style: italic;</string>
<rect>
<x>0</x>
<y>0</y>
<width>385</width>
<height>753</height>
<width>430</width>
<height>708</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">

0 comments on commit b37f066

Please sign in to comment.