Skip to content

Commit

Permalink
[GRASS] removed add new vector action from toolbar/menu in favour of …
Browse files Browse the repository at this point in the history
…browser
  • Loading branch information
blazek committed Sep 25, 2015
1 parent 99bb8fd commit b549577
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/plugins/grass/qgsgrass_plugin.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<file alias="grass_module_error.png">themes/default/grass_module_error.png</file>
<file alias="grass_module_warning.png">themes/default/grass_module_warning.png</file>
<file alias="grass_new_mapset.png">themes/default/grass_new_mapset.png</file>
<file alias="grass_new_vector_layer.png">themes/default/grass_new_vector_layer.png</file>
<file alias="grass_open_mapset.png">themes/default/grass_open_mapset.png</file>
<file alias="grass_options_region.png">themes/default/grass_options_region.png</file>
<file alias="grass_region_edit.png">themes/default/grass_region_edit.png</file>
Expand Down
19 changes: 0 additions & 19 deletions src/plugins/grass/qgsgrassplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ QgsGrassPlugin::QgsGrassPlugin( QgisInterface * theQgisInterFace )
, mNewMapsetAction( 0 )
, mCloseMapsetAction( 0 )
, mOpenToolsAction( 0 )
, mNewVectorAction( 0 )
, mAddFeatureAction( 0 )
, mAddPointAction( 0 )
, mAddLineAction( 0 )
Expand Down Expand Up @@ -177,15 +176,11 @@ void QgsGrassPlugin::initGui()
mRegionAction->setWhatsThis( tr( "Displays the current GRASS region as a rectangle on the map canvas" ) );
mRegionAction->setCheckable( true );

mNewVectorAction = new QAction( QIcon(), tr( "Create New GRASS Vector" ), this );
mNewVectorAction->setObjectName( "mNewVectorAction" );

mOptionsAction = new QAction( QIcon(), tr( "GRASS Options" ), this );
mOptionsAction->setObjectName( "mOptionsAction" );

// Connect the action
connect( mOpenToolsAction, SIGNAL( triggered() ), this, SLOT( openTools() ) );
connect( mNewVectorAction, SIGNAL( triggered() ), this, SLOT( newVector() ) );
connect( mRegionAction, SIGNAL( toggled( bool ) ), this, SLOT( switchRegion( bool ) ) );
connect( mOpenMapsetAction, SIGNAL( triggered() ), this, SLOT( openMapset() ) );
connect( mNewMapsetAction, SIGNAL( triggered() ), this, SLOT( newMapset() ) );
Expand All @@ -197,7 +192,6 @@ void QgsGrassPlugin::initGui()
qGisInterface->addPluginToMenu( menu, mOpenMapsetAction );
qGisInterface->addPluginToMenu( menu, mNewMapsetAction );
qGisInterface->addPluginToMenu( menu, mCloseMapsetAction );
qGisInterface->addPluginToMenu( menu, mNewVectorAction );
qGisInterface->addPluginToMenu( menu, mOpenToolsAction );
qGisInterface->addPluginToMenu( menu, mRegionAction );
qGisInterface->addPluginToMenu( menu, mOptionsAction );
Expand All @@ -211,7 +205,6 @@ void QgsGrassPlugin::initGui()
mToolBarPointer->addAction( mNewMapsetAction );
mToolBarPointer->addAction( mCloseMapsetAction );
mToolBarPointer->addSeparator();
mToolBarPointer->addAction( mNewVectorAction );
mToolBarPointer->addAction( mOpenToolsAction );
mToolBarPointer->addAction( mRegionAction );

Expand Down Expand Up @@ -307,18 +300,15 @@ void QgsGrassPlugin::onGisbaseChanged()
qGisInterface->messageBar()->pushMessage( tr( "GRASS error" ), QgsGrass::errorMessage(), QgsMessageBar::WARNING );

mOpenToolsAction->setDisabled( false ); // allow to open to see that tools are disabled
mNewVectorAction->setDisabled( true );
mRegionAction->setDisabled( true );
mOpenMapsetAction->setDisabled( true );
mNewMapsetAction->setDisabled( true );
mCloseMapsetAction->setDisabled( true );

mTools->setDisabled( true );
}
else
{
mOpenToolsAction->setDisabled( false );
mNewVectorAction->setDisabled( false );
mRegionAction->setDisabled( !QgsGrass::activeMode() );
mOpenMapsetAction->setDisabled( false );
mNewMapsetAction->setDisabled( false );
Expand Down Expand Up @@ -495,13 +485,11 @@ void QgsGrassPlugin::mapsetChanged()
mRegionAction->setEnabled( false );
mRegionBand->reset();
mCloseMapsetAction->setEnabled( false );
mNewVectorAction->setEnabled( false );
}
else
{
mRegionAction->setEnabled( true );
mCloseMapsetAction->setEnabled( true );
mNewVectorAction->setEnabled( true );

QSettings settings;
bool on = settings.value( "/GRASS/region/on", true ).toBool();
Expand Down Expand Up @@ -784,15 +772,13 @@ void QgsGrassPlugin::unload()
qGisInterface->removePluginMenu( tr( "&GRASS" ), mCloseMapsetAction );
qGisInterface->removePluginMenu( tr( "&GRASS" ), mOpenToolsAction );
qGisInterface->removePluginMenu( tr( "&GRASS" ), mRegionAction );
qGisInterface->removePluginMenu( tr( "&GRASS" ), mNewVectorAction );
qGisInterface->removePluginMenu( tr( "&GRASS" ), mOptionsAction );

delete mOpenMapsetAction;
delete mNewMapsetAction;
delete mCloseMapsetAction;
delete mOpenToolsAction;
delete mRegionAction;
delete mNewVectorAction;
delete mOptionsAction;

delete mAddFeatureAction;
Expand Down Expand Up @@ -831,13 +817,8 @@ void QgsGrassPlugin::setCurrentTheme( QString theThemeName )
mOpenMapsetAction->setIcon( getThemeIcon( "grass_open_mapset.png" ) );
mNewMapsetAction->setIcon( getThemeIcon( "grass_new_mapset.png" ) );
mCloseMapsetAction->setIcon( getThemeIcon( "grass_close_mapset.png" ) );

mOpenToolsAction->setIcon( getThemeIcon( "grass_tools.png" ) );

mRegionAction->setIcon( getThemeIcon( "grass_region.png" ) );

mNewVectorAction->setIcon( getThemeIcon( "grass_new_vector_layer.png" ) );

mOptionsAction->setIcon( QgsApplication::getThemeIcon( "propertyicons/general.svg" ) );
}
}
Expand Down
1 change: 0 additions & 1 deletion src/plugins/grass/qgsgrassplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class QgsGrassPlugin : public QObject, public QgisPlugin
QAction *mNewMapsetAction;
QAction *mCloseMapsetAction;
QAction *mOpenToolsAction;
QAction *mNewVectorAction;
QAction *mOptionsAction;

// Editing static bool mNonInitializable;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit b549577

Please sign in to comment.