mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -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;
|
mCurrentLayer = layer;
|
||||||
|
|
||||||
|
mUndoWidget->setUndoStack( layer->undoStackStyles() );
|
||||||
|
|
||||||
connect( mCurrentLayer, SIGNAL( styleChanged() ), this, SLOT( updateCurrentWidgetLayer() ) );
|
connect( mCurrentLayer, SIGNAL( styleChanged() ), this, SLOT( updateCurrentWidgetLayer() ) );
|
||||||
|
|
||||||
int lastPage = mOptionsListWidget->currentIndex().row();
|
int lastPage = mOptionsListWidget->currentIndex().row();
|
||||||
@ -171,7 +174,6 @@ void QgsLayerStylingWidget::setLayer( QgsMapLayer *layer )
|
|||||||
{
|
{
|
||||||
if ( factory->supportsLayer( layer ) )
|
if ( factory->supportsLayer( layer ) )
|
||||||
{
|
{
|
||||||
QgsDebugMsg( "MAKING PANEL" );
|
|
||||||
QListWidgetItem* item = new QListWidgetItem( factory->icon(), QString() );
|
QListWidgetItem* item = new QListWidgetItem( factory->icon(), QString() );
|
||||||
mOptionsListWidget->addItem( item );
|
mOptionsListWidget->addItem( item );
|
||||||
int row = mOptionsListWidget->row( item );
|
int row = mOptionsListWidget->row( item );
|
||||||
@ -285,8 +287,6 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
|
|||||||
|
|
||||||
mBlockAutoApply = true;
|
mBlockAutoApply = true;
|
||||||
|
|
||||||
mUndoWidget->setUndoStack( mCurrentLayer->undoStackStyles() );
|
|
||||||
|
|
||||||
whileBlocking( mLayerCombo )->setLayer( mCurrentLayer );
|
whileBlocking( mLayerCombo )->setLayer( mCurrentLayer );
|
||||||
|
|
||||||
int row = mOptionsListWidget->currentIndex().row();
|
int row = mOptionsListWidget->currentIndex().row();
|
||||||
@ -296,7 +296,6 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
|
|||||||
QgsPanelWidget* current = mWidgetStack->takeMainWidget();
|
QgsPanelWidget* current = mWidgetStack->takeMainWidget();
|
||||||
if ( current )
|
if ( current )
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( QgsLabelingWidget* widget = qobject_cast<QgsLabelingWidget*>( current ) )
|
if ( QgsLabelingWidget* widget = qobject_cast<QgsLabelingWidget*>( current ) )
|
||||||
{
|
{
|
||||||
mLabelingWidget = widget;
|
mLabelingWidget = widget;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user