Skip to content
Permalink
Browse files

Fix #14897 - Remove double undo/redo buttons (#8189)

  • Loading branch information
NathanW2 committed Oct 15, 2018
1 parent 3a684c8 commit c0d35ce5de92fdc337ae22ebe80ce80a14663567
Showing with 12 additions and 0 deletions.
  1. +1 −0 src/app/qgslayerstylingwidget.cpp
  2. +5 −0 src/app/qgsundowidget.cpp
  3. +6 −0 src/app/qgsundowidget.h
@@ -75,6 +75,7 @@ QgsLayerStylingWidget::QgsLayerStylingWidget( QgsMapCanvas *canvas, const QList<
mAutoApplyTimer->setSingleShot( true );

mUndoWidget = new QgsUndoWidget( this, mMapCanvas );
mUndoWidget->setButtonsVisible( false );
mUndoWidget->setAutoDelete( false );
mUndoWidget->setObjectName( QStringLiteral( "Undo Styles" ) );
mUndoWidget->hide();
@@ -38,6 +38,11 @@ QgsUndoWidget::QgsUndoWidget( QWidget *parent, QgsMapCanvas *mapCanvas )
mPreviousCount = 0;
}

void QgsUndoWidget::setButtonsVisible( bool show )
{
undoButton->setVisible( show );
redoButton->setVisible( show );
}

void QgsUndoWidget::destroyStack()
{
@@ -55,6 +55,12 @@ class APP_EXPORT QgsUndoWidget : public QgsPanelWidget
*/
void setUndoStack( QUndoStack *undoStack );

/**
* Show or hide the undo/redo buttons on the widget.
* \param show Show or hide the undo/redo buttons.
*/
void setButtonsVisible( bool show );

/**
* Handles destroying of stack when active layer is changed
*/

0 comments on commit c0d35ce

Please sign in to comment.
You can’t perform that action at this time.