From 55b93091e65f4aad5986460c6bab40a04a9c7ace Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Wed, 29 Apr 2015 18:15:46 +0200 Subject: [PATCH] Add reset method to ReplacePage. --- src/modules/partition/gui/ReplacePage.cpp | 10 ++++++++++ src/modules/partition/gui/ReplacePage.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/modules/partition/gui/ReplacePage.cpp b/src/modules/partition/gui/ReplacePage.cpp index f0a51b8ff..be76fa642 100644 --- a/src/modules/partition/gui/ReplacePage.cpp +++ b/src/modules/partition/gui/ReplacePage.cpp @@ -72,6 +72,16 @@ ReplacePage::isNextEnabled() const } +void +ReplacePage::reset() +{ + int oldDeviceIndex = m_ui->deviceComboBox->currentIndex(); + m_core->revert(); + m_ui->deviceComboBox->setCurrentIndex( oldDeviceIndex ); + updateFromCurrentDevice(); +} + + void ReplacePage::applyChanges() { diff --git a/src/modules/partition/gui/ReplacePage.h b/src/modules/partition/gui/ReplacePage.h index 7f8191ef4..d0d54f865 100644 --- a/src/modules/partition/gui/ReplacePage.h +++ b/src/modules/partition/gui/ReplacePage.h @@ -39,6 +39,8 @@ public: bool isNextEnabled() const; + void reset(); + void applyChanges(); signals: