Skip to content
Permalink
Browse files

confirmation/undo/redo for #1650

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12385 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 9, 2009
1 parent 5cdfaf0 commit 46f93fccfca02bcf10b701e22823a76540826da6
Showing with 14 additions and 9 deletions.
  1. +1 −1 src/app/attributetable/qgsattributetabledialog.cpp
  2. +8 −4 src/app/qgisapp.cpp
  3. +5 −4 src/app/qgisapp.h
@@ -235,7 +235,7 @@ void QgsAttributeTableDialog::on_mRemoveSelectionButton_clicked()

void QgsAttributeTableDialog::on_mDeleteSelectedButton_clicked()
{
mLayer->deleteSelectedFeatures();
QgisApp::instance()->deleteSelected( mLayer );
}

void QgsAttributeTableDialog::on_cbxShowSelectedOnly_toggled( bool theFlag )
@@ -3496,9 +3496,13 @@ void QgisApp::layerProperties()
mMapLegend->legendLayerShowProperties();
}

void QgisApp::deleteSelected()
void QgisApp::deleteSelected( QgsMapLayer *layer )
{
QgsMapLayer *layer = mMapLegend->currentLayer();
if ( !layer )
{
layer = mMapLegend->currentLayer();
}

if ( !layer )
{
QMessageBox::information( this, tr( "No Layer Selected" ),
@@ -3633,13 +3637,13 @@ QgsComposer* QgisApp::createNewComposer()
//and place action into print composers menu
mPrintComposersMenu->addAction( newComposerObject->windowAction() );
newComposerObject->open();
emit composerAdded(newComposerObject->view());
emit composerAdded( newComposerObject->view() );
return newComposerObject;
}

void QgisApp::deleteComposer( QgsComposer* c )
{
emit composerWillBeRemoved(c->view());
emit composerWillBeRemoved( c->view() );
mPrintComposers.remove( c );
mPrintComposersMenu->removeAction( c->windowAction() );
delete c;
@@ -379,6 +379,9 @@ class QgisApp : public QMainWindow

void loadOGRSublayers( QString layertype, QString uri, QStringList list );

/**Deletes the selected attributes for the currently selected vector layer*/
void deleteSelected( QgsMapLayer *layer = 0 );

protected:

//! Handle state changes (WindowTitleChange)
@@ -512,8 +515,6 @@ class QgisApp : public QMainWindow
void captureLine();
//! activates the capture polygon tool
void capturePolygon();
/**Deletes the selected attributes for the currently selected vector layer*/
void deleteSelected();
//! activates the move feature tool
void moveFeature();
//! activates the reshape features tool
@@ -674,8 +675,8 @@ class QgisApp : public QMainWindow
@note added in version 1.4*/
void composerAdded( QgsComposerView* v );

/**This signal is emitted before a new composer instance is going to be removed
@note added in version 1.4*/
/**This signal is emitted before a new composer instance is going to be removed
@note added in version 1.4*/
void composerWillBeRemoved( QgsComposerView* v );


0 comments on commit 46f93fc

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