Skip to content

Commit 96abc25

Browse files
committed
Ensure Add Oracle Raster Layer action comes before Add WMS Layer action on Manage Layers toolbar
- Should come before Add SQL Anywhere Layer and just after Add Oracle Spatial Layer if all are supported and shown
1 parent 113a64b commit 96abc25

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/plugins/oracle_raster/qgsoracle_plugin.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include "qgsoracle_plugin.h"
1717
#include "qgsselectgeoraster_ui.h"
1818

19+
#include <QMenu>
20+
1921
static const QString sName = QObject::tr( "Oracle Spatial GeoRaster" );
2022
static const QString sDescription = QObject::tr( "Access Oracle Spatial GeoRaster" );
2123
static const QString sCategory = QObject::tr( "Layers" );
@@ -51,17 +53,17 @@ QgsOraclePlugin::~QgsOraclePlugin()
5153
*/
5254
void QgsOraclePlugin::initGui()
5355
{
54-
5556
// Create the action for tool
5657
mQActionPointer = new QAction( QIcon( ":/oracleplugin/oracleplugin.png" ), tr( "Add Oracle GeoRaster Layer..." ), this );
5758
// Set the what's this text
5859
mQActionPointer->setWhatsThis( tr( "Add a Oracle Spatial GeoRaster..." ) );
5960
// Connect the action to the run
6061
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
61-
// Add the icon to the toolbar
62-
mQGisIface->layerToolBar()->addAction( mQActionPointer );
63-
mQGisIface->insertAddLayerAction( mQActionPointer );
6462

63+
// Add the icon to the new layers toolbar
64+
mQGisIface->layerToolBar()->insertAction( mQGisIface->actionAddWmsLayer(), mQActionPointer );
65+
// Also add to Layer menu
66+
mQGisIface->layerMenu()->insertAction( mQGisIface->actionAddWmsLayer(), mQActionPointer );
6567
}
6668
//method defined in interface
6769

0 commit comments

Comments
 (0)