Skip to content
Permalink
Browse files

Move embed action to layer menu

  • Loading branch information
mhugent committed Jun 9, 2011
1 parent 9a90855 commit 71d96a25b5543a91f83e6148cf9e01691f90549d
Showing with 14 additions and 2 deletions.
  1. +9 −0 src/app/qgsembedlayerdialog.cpp
  2. +5 −2 src/ui/qgisapp.ui
@@ -1,8 +1,10 @@
#include "qgsembedlayerdialog.h"
#include "qgsproject.h"
#include "qgisapp.h"
#include <QDomDocument>
#include <QFileDialog>
#include <QFileInfo>
#include <QMessageBox>
#include <QSettings>

QgsEmbedLayerDialog::QgsEmbedLayerDialog( QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f )
@@ -72,6 +74,13 @@ void QgsEmbedLayerDialog::changeProjectFile()
return;
}

//check we are not embedding from/to the same project
if( mProjectFileLineEdit->text() == QgsProject::instance()->fileName() )
{
QMessageBox::critical( 0, tr("Recursive embeding not possible"), tr("It is not possible to embed layers / groups from the current project") );
return;
}

mTreeWidget->clear();

//parse project file and fill tree
@@ -132,6 +132,7 @@
<addaction name="mActionNewSpatialiteLayer"/>
</widget>
<addaction name="menuNew"/>
<addaction name="mActionEmbedLayers"/>
<addaction name="mActionAddOgrLayer"/>
<addaction name="mActionAddRasterLayer"/>
<addaction name="mActionAddPgLayer"/>
@@ -234,7 +235,6 @@
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="mActionEmbedLayers"/>
<addaction name="mActionAddOgrLayer"/>
<addaction name="mActionAddRasterLayer"/>
<addaction name="mActionAddPgLayer"/>
@@ -1483,7 +1483,10 @@
</action>
<action name="mActionEmbedLayers">
<property name="text">
<string>Embed Layers</string>
<string>Embed layers and groups...</string>
</property>
<property name="toolTip">
<string>Embed layers and groups from other project files</string>
</property>
</action>
</widget>

0 comments on commit 71d96a2

Please sign in to comment.
You can’t perform that action at this time.