From 5c921a617da29eeeedc6f78dd34263963efeeac0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 14 Oct 2019 14:59:06 +0100 Subject: Resolves: tdf#128134 page creation order affecting travel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the page is created before the page is moved to, so CanTravel gets locked. Only lock when the page is the current page Change-Id: Ic21fe3077a750e1279db8be0dd5c7f9112c999b1 Reviewed-on: https://gerrit.libreoffice.org/80779 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 10 ++++++---- include/vcl/wizardmachine.hxx | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index ef67bf7fe568..89f60fa929d2 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -156,14 +156,16 @@ void CreationWizard::enterState(WizardState nState) vcl::RoadmapWizardMachine::enterState(nState); } -void CreationWizard::setInvalidPage( BuilderPage * /* pTabPage */ ) +void CreationWizard::setInvalidPage(BuilderPage* pTabPage) { - m_bCanTravel = false; + if (pTabPage == m_pCurTabPage) + m_bCanTravel = false; } -void CreationWizard::setValidPage( BuilderPage * /* pTabPage */ ) +void CreationWizard::setValidPage(BuilderPage* pTabPage) { - m_bCanTravel = true; + if (pTabPage == m_pCurTabPage) + m_bCanTravel = true; } OUString CreationWizard::getStateDisplayName( WizardState nState ) const diff --git a/include/vcl/wizardmachine.hxx b/include/vcl/wizardmachine.hxx index cbe4b40b4202..365f875f8783 100644 --- a/include/vcl/wizardmachine.hxx +++ b/include/vcl/wizardmachine.hxx @@ -119,9 +119,9 @@ namespace vcl */ class VCL_DLLPUBLIC WizardMachine : public weld::AssistantController { - private: + protected: BuilderPage* m_pCurTabPage; - + private: WizardTypes::WizardState m_nCurState; WizPageData* m_pFirstPage; -- cgit