Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 663e95d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/app/qgsattributetabledialog.cpp
Expand Up @@ -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() ) );
Expand Down Expand Up @@ -222,6 +224,7 @@ void QgsAttributeTableDialog::columnBoxInit()
{
mFilterColumnsMenu->removeAction( a );
mFilterActionMapper->removeMappings( a );
mFilterButton->removeAction( a );
delete a;
}

Expand Down Expand Up @@ -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();
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsattributetabledialog.h
Expand Up @@ -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;

Expand Down

0 comments on commit 663e95d

Please sign in to comment.