Skip to content

Commit 5ac34ce

Browse files
committedAug 23, 2016
Restore cancel button in color dialog when used from layer properties
1 parent 993aa84 commit 5ac34ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/gui/qgscolorbutton.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ const QPixmap& QgsColorButton::transparentBackground()
9494

9595
void QgsColorButton::showColorDialog()
9696
{
97-
if ( QgsPanelWidget* panel = QgsPanelWidget::findParentPanel( this ) )
97+
QgsPanelWidget* panel = QgsPanelWidget::findParentPanel( this );
98+
if ( panel && panel->dockMode() )
9899
{
99-
QgsCompoundColorWidget* colorWidget = new QgsCompoundColorWidget( panel, color(), panel->dockMode() ? QgsCompoundColorWidget::LayoutVertical :
100-
QgsCompoundColorWidget::LayoutDefault );
100+
QgsCompoundColorWidget* colorWidget = new QgsCompoundColorWidget( panel, color(), QgsCompoundColorWidget::LayoutVertical );
101101
colorWidget->setPanelTitle( mColorDialogTitle );
102102
colorWidget->setAllowAlpha( mAllowAlpha );
103103
connect( colorWidget, SIGNAL( currentColorChanged( QColor ) ), this, SLOT( setValidTemporaryColor( QColor ) ) );

0 commit comments

Comments
 (0)
Please sign in to comment.