summaryrefslogtreecommitdiffstats
path: root/application/dialogs/CopyInstanceDialog.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2020-01-09 15:31:32 +0100
committerPetr Mrázek <peterix@gmail.com>2020-01-09 15:31:32 +0100
commitbc98181ec274dfc933c5c0207943f9de1dbaf1d1 (patch)
treed74fd6ac1bbcff13cd8a8df63696f48c06a91544 /application/dialogs/CopyInstanceDialog.cpp
parent6a095deea62556eaa3c10b03a1426c751b22fc7c (diff)
downloadMultiMC-bc98181ec274dfc933c5c0207943f9de1dbaf1d1.tar
MultiMC-bc98181ec274dfc933c5c0207943f9de1dbaf1d1.tar.gz
MultiMC-bc98181ec274dfc933c5c0207943f9de1dbaf1d1.tar.lz
MultiMC-bc98181ec274dfc933c5c0207943f9de1dbaf1d1.tar.xz
MultiMC-bc98181ec274dfc933c5c0207943f9de1dbaf1d1.zip
GH-2769 add an option to not copy play time when copying instances
Diffstat (limited to 'application/dialogs/CopyInstanceDialog.cpp')
-rw-r--r--application/dialogs/CopyInstanceDialog.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/application/dialogs/CopyInstanceDialog.cpp b/application/dialogs/CopyInstanceDialog.cpp
index 6100860c..ab76e737 100644
--- a/application/dialogs/CopyInstanceDialog.cpp
+++ b/application/dialogs/CopyInstanceDialog.cpp
@@ -53,6 +53,7 @@ CopyInstanceDialog::CopyInstanceDialog(InstancePtr original, QWidget *parent)
ui->groupBox->setCurrentIndex(index);
ui->groupBox->lineEdit()->setPlaceholderText(tr("No group"));
ui->copySavesCheckbox->setChecked(m_copySaves);
+ ui->keepPlaytimeCheckbox->setChecked(m_keepPlaytime);
}
CopyInstanceDialog::~CopyInstanceDialog()
@@ -123,3 +124,21 @@ void CopyInstanceDialog::on_copySavesCheckbox_stateChanged(int state)
m_copySaves = true;
}
}
+
+bool CopyInstanceDialog::shouldKeepPlaytime() const
+{
+ return m_keepPlaytime;
+}
+
+
+void CopyInstanceDialog::on_keepPlaytimeCheckbox_stateChanged(int state)
+{
+ if(state == Qt::Unchecked)
+ {
+ m_keepPlaytime = false;
+ }
+ else if(state == Qt::Checked)
+ {
+ m_keepPlaytime = true;
+ }
+}