Skip to content

Commit

Permalink
Save / restore settings for annotation tools. Developed for Faunalia (h…
Browse files Browse the repository at this point in the history
…ttp://www.faunalia.it) with funding from Regione Toscana - Settore SISTEMA INFORMATIVO TERRITORIALE ED AMBIENTALE
  • Loading branch information
mhugent committed Nov 6, 2012
1 parent 5a9418c commit 550a2c6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1414,8 +1414,10 @@ void QgisApp::createToolBars()
{
case 0: defAnnotationAction = mActionTextAnnotation; break;
case 1: defAnnotationAction = mActionFormAnnotation; break;
case 2: defAnnotationAction = mActionAnnotation; break;
case 3: defAnnotationAction = mActionHtmlAnnotation; break;
case 2: defAnnotationAction = mActionHtmlAnnotation; break;
case 3: defAnnotationAction = mActionSvgAnnotation; break;
case 4: defAnnotationAction = mActionAnnotation; break;

}
bt->setDefaultAction( defAnnotationAction );
QAction* annotationAction = mAttributesToolBar->addWidget( bt );
Expand Down Expand Up @@ -8001,11 +8003,12 @@ void QgisApp::toolButtonActionTriggered( QAction *action )
settings.setValue( "/UI/annotationTool", 0 );
else if ( action == mActionFormAnnotation )
settings.setValue( "/UI/annotationTool", 1 );
else if ( action == mActionAnnotation )
settings.setValue( "/UI/annotationTool", 2 );
else if ( action == mActionHtmlAnnotation )
settings.setValue( "/UI/annotationTool", 3 );

settings.setValue( "/UI/annotationTool", 2 );
else if ( action == mActionSvgAnnotation )
settings.setValue( "UI/annotationTool", 3 );
else if ( action == mActionAnnotation )
settings.setValue( "/UI/annotationTool", 4 );
bt->setDefaultAction( action );
}

Expand Down

0 comments on commit 550a2c6

Please sign in to comment.