Skip to content

Commit b549577

Browse files
committed
[GRASS] removed add new vector action from toolbar/menu in favour of browser
1 parent 99bb8fd commit b549577

File tree

6 files changed

+0
-21
lines changed

6 files changed

+0
-21
lines changed

src/plugins/grass/qgsgrass_plugin.qrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<file alias="grass_module_error.png">themes/default/grass_module_error.png</file>
88
<file alias="grass_module_warning.png">themes/default/grass_module_warning.png</file>
99
<file alias="grass_new_mapset.png">themes/default/grass_new_mapset.png</file>
10-
<file alias="grass_new_vector_layer.png">themes/default/grass_new_vector_layer.png</file>
1110
<file alias="grass_open_mapset.png">themes/default/grass_open_mapset.png</file>
1211
<file alias="grass_options_region.png">themes/default/grass_options_region.png</file>
1312
<file alias="grass_region_edit.png">themes/default/grass_region_edit.png</file>

src/plugins/grass/qgsgrassplugin.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ QgsGrassPlugin::QgsGrassPlugin( QgisInterface * theQgisInterFace )
8181
, mNewMapsetAction( 0 )
8282
, mCloseMapsetAction( 0 )
8383
, mOpenToolsAction( 0 )
84-
, mNewVectorAction( 0 )
8584
, mAddFeatureAction( 0 )
8685
, mAddPointAction( 0 )
8786
, mAddLineAction( 0 )
@@ -177,15 +176,11 @@ void QgsGrassPlugin::initGui()
177176
mRegionAction->setWhatsThis( tr( "Displays the current GRASS region as a rectangle on the map canvas" ) );
178177
mRegionAction->setCheckable( true );
179178

180-
mNewVectorAction = new QAction( QIcon(), tr( "Create New GRASS Vector" ), this );
181-
mNewVectorAction->setObjectName( "mNewVectorAction" );
182-
183179
mOptionsAction = new QAction( QIcon(), tr( "GRASS Options" ), this );
184180
mOptionsAction->setObjectName( "mOptionsAction" );
185181

186182
// Connect the action
187183
connect( mOpenToolsAction, SIGNAL( triggered() ), this, SLOT( openTools() ) );
188-
connect( mNewVectorAction, SIGNAL( triggered() ), this, SLOT( newVector() ) );
189184
connect( mRegionAction, SIGNAL( toggled( bool ) ), this, SLOT( switchRegion( bool ) ) );
190185
connect( mOpenMapsetAction, SIGNAL( triggered() ), this, SLOT( openMapset() ) );
191186
connect( mNewMapsetAction, SIGNAL( triggered() ), this, SLOT( newMapset() ) );
@@ -197,7 +192,6 @@ void QgsGrassPlugin::initGui()
197192
qGisInterface->addPluginToMenu( menu, mOpenMapsetAction );
198193
qGisInterface->addPluginToMenu( menu, mNewMapsetAction );
199194
qGisInterface->addPluginToMenu( menu, mCloseMapsetAction );
200-
qGisInterface->addPluginToMenu( menu, mNewVectorAction );
201195
qGisInterface->addPluginToMenu( menu, mOpenToolsAction );
202196
qGisInterface->addPluginToMenu( menu, mRegionAction );
203197
qGisInterface->addPluginToMenu( menu, mOptionsAction );
@@ -211,7 +205,6 @@ void QgsGrassPlugin::initGui()
211205
mToolBarPointer->addAction( mNewMapsetAction );
212206
mToolBarPointer->addAction( mCloseMapsetAction );
213207
mToolBarPointer->addSeparator();
214-
mToolBarPointer->addAction( mNewVectorAction );
215208
mToolBarPointer->addAction( mOpenToolsAction );
216209
mToolBarPointer->addAction( mRegionAction );
217210

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

309302
mOpenToolsAction->setDisabled( false ); // allow to open to see that tools are disabled
310-
mNewVectorAction->setDisabled( true );
311303
mRegionAction->setDisabled( true );
312304
mOpenMapsetAction->setDisabled( true );
313-
mNewMapsetAction->setDisabled( true );
314305
mCloseMapsetAction->setDisabled( true );
315306

316307
mTools->setDisabled( true );
317308
}
318309
else
319310
{
320311
mOpenToolsAction->setDisabled( false );
321-
mNewVectorAction->setDisabled( false );
322312
mRegionAction->setDisabled( !QgsGrass::activeMode() );
323313
mOpenMapsetAction->setDisabled( false );
324314
mNewMapsetAction->setDisabled( false );
@@ -495,13 +485,11 @@ void QgsGrassPlugin::mapsetChanged()
495485
mRegionAction->setEnabled( false );
496486
mRegionBand->reset();
497487
mCloseMapsetAction->setEnabled( false );
498-
mNewVectorAction->setEnabled( false );
499488
}
500489
else
501490
{
502491
mRegionAction->setEnabled( true );
503492
mCloseMapsetAction->setEnabled( true );
504-
mNewVectorAction->setEnabled( true );
505493

506494
QSettings settings;
507495
bool on = settings.value( "/GRASS/region/on", true ).toBool();
@@ -784,15 +772,13 @@ void QgsGrassPlugin::unload()
784772
qGisInterface->removePluginMenu( tr( "&GRASS" ), mCloseMapsetAction );
785773
qGisInterface->removePluginMenu( tr( "&GRASS" ), mOpenToolsAction );
786774
qGisInterface->removePluginMenu( tr( "&GRASS" ), mRegionAction );
787-
qGisInterface->removePluginMenu( tr( "&GRASS" ), mNewVectorAction );
788775
qGisInterface->removePluginMenu( tr( "&GRASS" ), mOptionsAction );
789776

790777
delete mOpenMapsetAction;
791778
delete mNewMapsetAction;
792779
delete mCloseMapsetAction;
793780
delete mOpenToolsAction;
794781
delete mRegionAction;
795-
delete mNewVectorAction;
796782
delete mOptionsAction;
797783

798784
delete mAddFeatureAction;
@@ -831,13 +817,8 @@ void QgsGrassPlugin::setCurrentTheme( QString theThemeName )
831817
mOpenMapsetAction->setIcon( getThemeIcon( "grass_open_mapset.png" ) );
832818
mNewMapsetAction->setIcon( getThemeIcon( "grass_new_mapset.png" ) );
833819
mCloseMapsetAction->setIcon( getThemeIcon( "grass_close_mapset.png" ) );
834-
835820
mOpenToolsAction->setIcon( getThemeIcon( "grass_tools.png" ) );
836-
837821
mRegionAction->setIcon( getThemeIcon( "grass_region.png" ) );
838-
839-
mNewVectorAction->setIcon( getThemeIcon( "grass_new_vector_layer.png" ) );
840-
841822
mOptionsAction->setIcon( QgsApplication::getThemeIcon( "propertyicons/general.svg" ) );
842823
}
843824
}

src/plugins/grass/qgsgrassplugin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ class QgsGrassPlugin : public QObject, public QgisPlugin
155155
QAction *mNewMapsetAction;
156156
QAction *mCloseMapsetAction;
157157
QAction *mOpenToolsAction;
158-
QAction *mNewVectorAction;
159158
QAction *mOptionsAction;
160159

161160
// Editing static bool mNonInitializable;
-1.14 KB
Binary file not shown.
-1002 Bytes
Binary file not shown.
-2.05 KB
Binary file not shown.

0 commit comments

Comments
 (0)