Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/QGIS
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Oct 24, 2017
2 parents 87d087b + cff3569 commit 1c1ecf4
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 25 deletions.
1 change: 1 addition & 0 deletions scripts/spell_check/spelling.dat
Expand Up @@ -2547,6 +2547,7 @@ empirial:imperial
emporer:emperor
emprisoned:imprisoned
emptry:empty
empy:empty
emtied:emptied
emties:empties
emtpy:empty
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/CMakeLists.txt
Expand Up @@ -124,7 +124,6 @@ SET(QGIS_ANALYSIS_MOC_HDRS
vector/geometry_checker/qgsgeometryanglecheck.h
vector/geometry_checker/qgsgeometryareacheck.h
vector/geometry_checker/qgsgeometrychecker.h
vector/geometry_checker/qgsgeometrycheckerutils.h
vector/geometry_checker/qgsgeometrycheck.h
vector/geometry_checker/qgsgeometrycontainedcheck.h
vector/geometry_checker/qgsgeometrydanglecheck.h
Expand Down Expand Up @@ -202,6 +201,7 @@ SET(QGIS_ANALYSIS_HDRS
vector/mersenne-twister.h
vector/qgsgeometrysnapper.h
vector/qgszonalstatistics.h
vector/geometry_checker/qgsgeometrycheckerutils.h

interpolation/qgsinterpolator.h
interpolation/qgsgridfilewriter.h
Expand Down
45 changes: 26 additions & 19 deletions src/app/composer/qgsattributeselectiondialog.cpp
Expand Up @@ -280,6 +280,7 @@ QgsAttributeSelectionDialog::QgsAttributeSelectionDialog( QgsComposerAttributeTa
connect( mColumnUpPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mColumnUpPushButton_clicked );
connect( mColumnDownPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mColumnDownPushButton_clicked );
connect( mResetColumnsPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mResetColumnsPushButton_clicked );
connect( mClearColumnsPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mClearColumnsPushButton_clicked );
connect( mAddSortColumnPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mAddSortColumnPushButton_clicked );
connect( mRemoveSortColumnPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mRemoveSortColumnPushButton_clicked );
connect( mSortColumnUpPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mSortColumnUpPushButton_clicked );
Expand Down Expand Up @@ -330,13 +331,12 @@ QgsAttributeSelectionDialog::~QgsAttributeSelectionDialog()

void QgsAttributeSelectionDialog::mRemoveColumnPushButton_clicked()
{
//remove selected row from model
QItemSelection viewSelection( mColumnsTableView->selectionModel()->selection() );
if ( viewSelection.length() > 0 )
{
int selectedRow = viewSelection.indexes().at( 0 ).row();
mColumnModel->removeRow( selectedRow );
}
//remove selected rows from model
QModelIndexList indexes = mColumnsTableView->selectionModel()->selectedRows();
int count = indexes.count();

for ( int i = count; i > 0; --i )
mColumnModel->removeRow( indexes.at( i - 1 ).row(), QModelIndex() );
}

void QgsAttributeSelectionDialog::mAddColumnPushButton_clicked()
Expand All @@ -348,23 +348,23 @@ void QgsAttributeSelectionDialog::mAddColumnPushButton_clicked()
void QgsAttributeSelectionDialog::mColumnUpPushButton_clicked()
{
//move selected row up
QItemSelection viewSelection( mColumnsTableView->selectionModel()->selection() );
if ( !viewSelection.empty() )
{
int selectedRow = viewSelection.indexes().at( 0 ).row();
mColumnModel->moveRow( selectedRow, QgsComposerAttributeTableColumnModelV2::ShiftUp );
}

QModelIndexList indexes = mColumnsTableView->selectionModel()->selectedRows();
int count = indexes.count();

std::reverse( indexes.begin(), indexes.end() );
for ( int i = count; i > 0; --i )
mColumnModel->moveRow( indexes.at( i - 1 ).row(), QgsComposerAttributeTableColumnModelV2::ShiftUp );
}

void QgsAttributeSelectionDialog::mColumnDownPushButton_clicked()
{
//move selected row down
QItemSelection viewSelection( mColumnsTableView->selectionModel()->selection() );
if ( !viewSelection.empty() )
{
int selectedRow = viewSelection.indexes().at( 0 ).row();
mColumnModel->moveRow( selectedRow, QgsComposerAttributeTableColumnModelV2::ShiftDown );
}
QModelIndexList indexes = mColumnsTableView->selectionModel()->selectedRows();
int count = indexes.count();

for ( int i = count; i > 0; --i )
mColumnModel->moveRow( indexes.at( i - 1 ).row(), QgsComposerAttributeTableColumnModelV2::ShiftDown );
}

void QgsAttributeSelectionDialog::mResetColumnsPushButton_clicked()
Expand All @@ -374,6 +374,13 @@ void QgsAttributeSelectionDialog::mResetColumnsPushButton_clicked()
mSortColumnComboBox->setCurrentIndex( 0 );
}

void QgsAttributeSelectionDialog::mClearColumnsPushButton_clicked()
{
//remove all columns
mColumnModel->removeRows( 0, mColumnModel->rowCount() );
mSortColumnComboBox->setCurrentIndex( 0 );
}

void QgsAttributeSelectionDialog::mAddSortColumnPushButton_clicked()
{
//add column to sort order widget
Expand Down
1 change: 1 addition & 0 deletions src/app/composer/qgsattributeselectiondialog.h
Expand Up @@ -123,6 +123,7 @@ class QgsAttributeSelectionDialog: public QDialog, private Ui::QgsAttributeSelec
void mColumnUpPushButton_clicked();
void mColumnDownPushButton_clicked();
void mResetColumnsPushButton_clicked();
void mClearColumnsPushButton_clicked();
void mAddSortColumnPushButton_clicked();
void mRemoveSortColumnPushButton_clicked();
void mSortColumnUpPushButton_clicked();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology/qgsstylemanagerdialog.cpp
Expand Up @@ -792,7 +792,7 @@ bool QgsStyleManagerDialog::removeColorRamp()
{
QModelIndexList indexes = listItems->selectionModel()->selectedIndexes();
if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Confirm removal" ),
QString( tr( "Do you really want to remove %n ramps(s)?", nullptr, indexes.count() ) ),
QString( tr( "Do you really want to remove %n ramp(s)?", nullptr, indexes.count() ) ),
QMessageBox::Yes,
QMessageBox::No ) )
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/providers/ogr/qgsgeopackagedataitems.cpp
Expand Up @@ -519,7 +519,7 @@ void QgsGeoPackageCollectionItem::addTable()
}
else
{
QgsDebugMsg( QStringLiteral( "Cannot add Table: connection %1 does not exists or the path is empy!" ).arg( connName ) );
QgsDebugMsg( QStringLiteral( "Cannot add Table: connection %1 does not exist or the path is empty!" ).arg( connName ) );
}
}

Expand Down Expand Up @@ -593,7 +593,7 @@ QgsGeoPackageAbstractLayerItem::QgsGeoPackageAbstractLayerItem( QgsDataItem *par

bool QgsGeoPackageAbstractLayerItem::executeDeleteLayer( QString &errCause )
{
errCause = QObject::tr( "The layer <b>%1</b> cannot be deleted because the this feature is not yet implemented for this kind of layers." ).arg( mName );
errCause = QObject::tr( "The layer <b>%1</b> cannot be deleted because this feature is not yet implemented for this kind of layers." ).arg( mName );
return false;
}

Expand Down
9 changes: 8 additions & 1 deletion src/ui/composer/qgsattributeselectiondialogbase.ui
Expand Up @@ -77,6 +77,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mClearColumnsPushButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
Expand Down Expand Up @@ -113,7 +120,7 @@
<enum>Qt::IgnoreAction</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
<enum>QAbstractItemView::MultiSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsvectorlayerpropertiesbase.ui
Expand Up @@ -2225,7 +2225,7 @@ border-radius: 2px;</string>
<item row="0" column="0">
<widget class="QLabel" name="label_1">
<property name="text">
<string>Auxiliary storage tables can contain additional data that should only belong to the project file. For instance, specific location or rotation for labels. Auxiliary data are saved in qgd files. New fields can be added from any data-defined widget when needed. Be aware that this information will NOT be saved in you datasource but only in the project file.</string>
<string>Auxiliary storage tables can contain additional data that should only belong to the project file. For instance, specific location or rotation for labels. Auxiliary data are saved in qgd files. New fields can be added from any data-defined widget when needed. Be aware that this information will NOT be saved in the data source but only in the project file.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand Down

0 comments on commit 1c1ecf4

Please sign in to comment.