@@ -624,8 +624,8 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
624624 QString myPaths = settings.value ( " plugins/searchPathsForPlugins" , " " ).toString ();
625625 if ( !myPaths.isEmpty () )
626626 {
627- QStringList myPathList = myPaths.split ( " |" );
628- QgsPluginRegistry::instance ()->restoreSessionPlugins ( myPathList );
627+ QStringList myPathList = myPaths.split ( " |" );
628+ QgsPluginRegistry::instance ()->restoreSessionPlugins ( myPathList );
629629 }
630630 }
631631
@@ -981,7 +981,7 @@ void QgisApp::createActions()
981981 connect ( mActionAddWmsLayer , SIGNAL ( triggered () ), this , SLOT ( addWmsLayer () ) );
982982 connect ( mActionAddWcsLayer , SIGNAL ( triggered () ), this , SLOT ( addWcsLayer () ) );
983983 connect ( mActionAddWfsLayer , SIGNAL ( triggered () ), this , SLOT ( addWfsLayer () ) );
984- connect ( mActionAddDelimitedText , SIGNAL ( triggered ()), this , SLOT (addDelimitedTextLayer ()) );
984+ connect ( mActionAddDelimitedText , SIGNAL ( triggered () ), this , SLOT ( addDelimitedTextLayer () ) );
985985 connect ( mActionOpenTable , SIGNAL ( triggered () ), this , SLOT ( attributeTable () ) );
986986 connect ( mActionOpenFieldCalc , SIGNAL ( triggered () ), this , SLOT ( fieldCalculator () ) );
987987 connect ( mActionToggleEditing , SIGNAL ( triggered () ), this , SLOT ( toggleEditing () ) );
@@ -2934,7 +2934,11 @@ void QgisApp::addDatabaseLayers( QStringList const & layerPathList, QString cons
29342934 else
29352935 {
29362936 QgsMessageLog::logMessage ( tr ( " %1 is an invalid layer - not loaded" ).arg ( layerPath ) );
2937- QMessageBox::critical ( this , tr ( " Invalid Layer" ), tr ( " %1 is an invalid layer and cannot be loaded." ).arg ( layerPath ) );
2937+ QLabel* msgLabel = new QLabel ( tr ( " %1 is an invalid layer and cannot be loaded. Please check the <a href=\" #messageLog\" >message log</a> for further info." ).arg ( layerPath ), messageBar () );
2938+ msgLabel->setWordWrap ( true );
2939+ connect ( msgLabel, SIGNAL ( linkActivated ( QString ) ), mLogDock , SLOT ( show () ) );
2940+ messageBar ()->pushWidget ( msgLabel,
2941+ QgsMessageBar::WARNING );
29382942 delete layer;
29392943 }
29402944 // qWarning("incrementing iterator");
@@ -4275,22 +4279,22 @@ void QgisApp::labeling()
42754279
42764280void QgisApp::fieldCalculator ()
42774281{
4278- if ( mMapCanvas && mMapCanvas ->isDrawing () )
4279- {
4280- return ;
4281- }
4282+ if ( mMapCanvas && mMapCanvas ->isDrawing () )
4283+ {
4284+ return ;
4285+ }
42824286
4283- QgsVectorLayer *myLayer = qobject_cast<QgsVectorLayer *>( activeLayer () );
4284- if ( !myLayer )
4285- {
4286- return ;
4287- }
4287+ QgsVectorLayer *myLayer = qobject_cast<QgsVectorLayer *>( activeLayer () );
4288+ if ( !myLayer )
4289+ {
4290+ return ;
4291+ }
42884292
4289- QgsFieldCalculator calc ( myLayer );
4290- if ( calc.exec () )
4291- {
4292- mMapCanvas ->refresh ();
4293- }
4293+ QgsFieldCalculator calc ( myLayer );
4294+ if ( calc.exec () )
4295+ {
4296+ mMapCanvas ->refresh ();
4297+ }
42944298}
42954299
42964300void QgisApp::attributeTable ()
0 commit comments