Skip to content
Permalink
Browse files

Merge pull request #2112 from slarosa/release-2_8

Backporting to 2.8.3
  • Loading branch information
slarosa committed Jul 13, 2015
2 parents b180dec + 1edcf3c commit 18c48f396a4d7da94161da92348e6f9d8d088c95
@@ -23,8 +23,7 @@ def load_user_expressions(path):
except:
error = traceback.format_exc()
msgtitle = QCoreApplication.translate("UserExpressions", "User expressions")
msg = QCoreApplication.translate("UserExpressions",
"The user expression {0} is not valid".format(name))
msg = QCoreApplication.translate("UserExpressions", "The user expression {0} is not valid").format(name)
QgsMessageLog.logMessage(msg +"\n"+ error, msgtitle, QgsMessageLog.WARNING)


@@ -88,7 +88,7 @@ fi

echo Updating python translations
cd python
pylupdate4 utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
pylupdate4 user.py utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
perl ../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
rm python-i18n.ts
cd ..
@@ -267,7 +267,7 @@ void QgsBookmarks::importFromXML()
{
QSettings settings;

QString lastUsedDir = settings.value( "/Bookmark/LastUsedDirectory", QVariant() ).toString();
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
QString fileName = QFileDialog::getOpenFileName( this, tr( "Import Bookmarks" ), lastUsedDir,
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
@@ -343,7 +343,7 @@ void QgsBookmarks::exportToXML()
{
QSettings settings;

QString lastUsedDir = settings.value( "/Bookmark/LastUsedDirectory", QVariant() ).toString();
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
QString fileName = QFileDialog::getSaveFileName( this, tr( "Export bookmarks" ), lastUsedDir,
tr( "XML files( *.xml *.XML )" ) );
if ( fileName.isEmpty() )
@@ -399,5 +399,5 @@ void QgsBookmarks::exportToXML()
doc.save( out, 2 );
f.close();

settings.setValue( "/Bookmark/LastUsedDirectory", QFileInfo( fileName ).path() );
settings.setValue( "/Windows/Bookmarks/LastUsedDirectory", QFileInfo( fileName ).path() );
}
@@ -81,6 +81,11 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
{
tab_2->setEnabled( false );
}

// select the first item in the function list
// in order to avoid a blank help widget
QModelIndex firstItem = mProxyModel->index( 0, 0, QModelIndex() );
expressionTree->setCurrentIndex( firstItem );
}


@@ -132,6 +137,8 @@ void QgsExpressionBuilderWidget::runPythonCode( QString code )
QgsPythonRunner::run( pythontext );
}
updateFunctionTree();
loadFieldNames();
loadRecent( mRecentKey );
}

void QgsExpressionBuilderWidget::saveFunctionFile( QString fileName )
@@ -347,6 +354,7 @@ void QgsExpressionBuilderWidget::saveToRecent( QString key )

void QgsExpressionBuilderWidget::loadRecent( QString key )
{
mRecentKey = key;
QString name = tr( "Recent (%1)" ).arg( key );
if ( mExpressionGroups.contains( name ) )
{
@@ -218,6 +218,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
QgsExpressionHighlighter* highlighter;
bool mExpressionValid;
QgsDistanceArea mDa;
QString mRecentKey;

};

@@ -203,6 +203,11 @@ void QgsRasterLayerSaveAsDialog::on_mBrowseButton_clicked()

if ( !fileName.isEmpty() )
{
// ensure the user never ommited the extension from the file name
if ( !fileName.toLower().endsWith( ".tif" ) && !fileName.toLower().endsWith( ".tiff" ) )
{
fileName += ".tif";
}
mSaveAsLineEdit->setText( fileName );
}
}

0 comments on commit 18c48f3

Please sign in to comment.
You can’t perform that action at this time.