From 83bd999f410ff09674a261e9a2a0da430089842f Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 1 Dec 2016 11:37:45 -0300 Subject: [PATCH] Move OpenFileCommand member functions to Params --- src/app/commands/cmd_open_file.cpp | 8 ++++++++ src/app/commands/cmd_open_file.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/commands/cmd_open_file.cpp b/src/app/commands/cmd_open_file.cpp index 018d01d33..5038bea76 100644 --- a/src/app/commands/cmd_open_file.cpp +++ b/src/app/commands/cmd_open_file.cpp @@ -88,6 +88,14 @@ void OpenFileCommand::onLoadParams(const Params& params) m_filename = params.get("filename"); m_folder = params.get("folder"); // Initial folder m_repeatCheckbox = (params.get("repeat_checkbox") == "true"); + + std::string sequence = params.get("sequence"); + if (sequence == "agree") + m_seqDecision = SequenceDecision::Agree; + else if (sequence == "skip") + m_seqDecision = SequenceDecision::Skip; + else + m_seqDecision = SequenceDecision::Ask; } void OpenFileCommand::onExecute(Context* context) diff --git a/src/app/commands/cmd_open_file.h b/src/app/commands/cmd_open_file.h index 62742fdd8..827ed3411 100644 --- a/src/app/commands/cmd_open_file.h +++ b/src/app/commands/cmd_open_file.h @@ -24,14 +24,6 @@ namespace app { OpenFileCommand(); Command* clone() const override { return new OpenFileCommand(*this); } - SequenceDecision sequenceDecision() const { - return m_seqDecision; - } - - void setSequenceDecision(SequenceDecision seqDecision) { - m_seqDecision = seqDecision; - } - const std::vector& usedFiles() const { return m_usedFiles; }