Skip to content

Commit

Permalink
hide the extent from canvas button if the canvas is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and m-kuhn committed Dec 14, 2017
1 parent 4312a84 commit 49990b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsextentgroupbox.cpp
Expand Up @@ -48,6 +48,7 @@ QgsExtentGroupBox::QgsExtentGroupBox( QWidget *parent )

mOriginalExtentButton->setVisible( false );
mButtonDrawOnCanvas->setVisible( false );
mCurrentExtentButton->setVisible( false );

connect( mCurrentExtentButton, &QAbstractButton::clicked, this, &QgsExtentGroupBox::setOutputExtentFromCurrent );
connect( mOriginalExtentButton, &QAbstractButton::clicked, this, &QgsExtentGroupBox::setOutputExtentFromOriginal );
Expand Down Expand Up @@ -332,9 +333,11 @@ void QgsExtentGroupBox::setMapCanvas( QgsMapCanvas *canvas )
{
mCanvas = canvas;
mButtonDrawOnCanvas->setVisible( true );
mCurrentExtentButton->setVisible( true );
}
else
{
mButtonDrawOnCanvas->setVisible( false );
mCurrentExtentButton->setVisible( false );
}
}

0 comments on commit 49990b8

Please sign in to comment.