Skip to content
Permalink
Browse files

[FIX #7529] Attribute table: Crash when changing column filter

When using the field calculator and afterwards changing the column filter
resulted in a crash
  • Loading branch information
m-kuhn committed Apr 8, 2013
1 parent de2efa7 commit 663e95d77e8eb8a07f3cc41db92776c55c619dda
Showing with 5 additions and 2 deletions.
  1. +3 −1 src/app/qgsattributetabledialog.cpp
  2. +2 −1 src/app/qgsattributetabledialog.h
@@ -110,6 +110,8 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
connect( mLayer, SIGNAL( editingStopped() ), this, SLOT( editingToggled() ) );
connect( mLayer, SIGNAL( layerDeleted() ), this, SLOT( close() ) );
connect( mLayer, SIGNAL( selectionChanged() ), this, SLOT( updateTitle() ) );
connect( mLayer, SIGNAL( attributeAdded(int) ), this, SLOT( columnBoxInit() ) );
connect( mLayer, SIGNAL( attributeDeleted(int) ), this, SLOT( columnBoxInit() ) );

// connect table info to window
connect( mMainView, SIGNAL( filterChanged() ), this, SLOT( updateTitle() ) );
@@ -222,6 +224,7 @@ void QgsAttributeTableDialog::columnBoxInit()
{
mFilterColumnsMenu->removeAction( a );
mFilterActionMapper->removeMappings( a );
mFilterButton->removeAction( a );
delete a;
}

@@ -348,7 +351,6 @@ void QgsAttributeTableDialog::on_mOpenFieldCalculator_clicked()
if ( col >= 0 )
{
masterModel->reload( masterModel->index( 0, col ), masterModel->index( masterModel->rowCount() - 1, col ) );
columnBoxInit();
}
}
}
@@ -163,12 +163,13 @@ class QgsAttributeTableDialog : public QDialog, private Ui::QgsAttributeTableDia
*/
void closeEvent( QCloseEvent* event );

private:
private slots:
/**
* Initialize column box
*/
void columnBoxInit();

private:
QMenu* mMenuActions;
QAction* mActionToggleEditing;

0 comments on commit 663e95d

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