mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
[style dock] fix crash with undo widget
This commit is contained in:
parent
600ff4f81f
commit
459fa8c0c5
@ -139,6 +139,9 @@ void QgsLayerStylingWidget::setLayer( QgsMapLayer *layer )
|
||||
}
|
||||
|
||||
mCurrentLayer = layer;
|
||||
|
||||
mUndoWidget->setUndoStack( layer->undoStackStyles() );
|
||||
|
||||
connect( mCurrentLayer, SIGNAL( styleChanged() ), this, SLOT( updateCurrentWidgetLayer() ) );
|
||||
|
||||
int lastPage = mOptionsListWidget->currentIndex().row();
|
||||
@ -171,7 +174,6 @@ void QgsLayerStylingWidget::setLayer( QgsMapLayer *layer )
|
||||
{
|
||||
if ( factory->supportsLayer( layer ) )
|
||||
{
|
||||
QgsDebugMsg( "MAKING PANEL" );
|
||||
QListWidgetItem* item = new QListWidgetItem( factory->icon(), QString() );
|
||||
mOptionsListWidget->addItem( item );
|
||||
int row = mOptionsListWidget->row( item );
|
||||
@ -285,8 +287,6 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
|
||||
|
||||
mBlockAutoApply = true;
|
||||
|
||||
mUndoWidget->setUndoStack( mCurrentLayer->undoStackStyles() );
|
||||
|
||||
whileBlocking( mLayerCombo )->setLayer( mCurrentLayer );
|
||||
|
||||
int row = mOptionsListWidget->currentIndex().row();
|
||||
@ -296,7 +296,6 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
|
||||
QgsPanelWidget* current = mWidgetStack->takeMainWidget();
|
||||
if ( current )
|
||||
{
|
||||
|
||||
if ( QgsLabelingWidget* widget = qobject_cast<QgsLabelingWidget*>( current ) )
|
||||
{
|
||||
mLabelingWidget = widget;
|
||||
|
Loading…
x
Reference in New Issue
Block a user