Make modify and delete commands respect rc.recurrence.confirmation config option.
This commit is contained in:
@@ -137,9 +137,10 @@ int CmdDelete::execute (std::string&)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::vector <Task> children = Context::getContext ().tdb2.children (task);
|
std::vector <Task> children = Context::getContext ().tdb2.children (task);
|
||||||
if (children.size () &&
|
if (children.size() &&
|
||||||
(Context::getContext ().config.getBoolean ("recurrence.confirmation") ||
|
((Context::getContext ().config.get ("recurrence.confirmation") == "prompt"
|
||||||
confirm (STRING_CMD_DELETE_CONFIRM_R)))
|
&& confirm (STRING_CMD_DELETE_CONFIRM_R)) ||
|
||||||
|
Context::getContext ().config.getBoolean ("recurrence.confirmation")))
|
||||||
{
|
{
|
||||||
for (auto& child : children)
|
for (auto& child : children)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -200,8 +200,9 @@ int CmdModify::modifyRecurrenceParent (
|
|||||||
|
|
||||||
auto children = Context::getContext ().tdb2.children (task);
|
auto children = Context::getContext ().tdb2.children (task);
|
||||||
if (children.size () &&
|
if (children.size () &&
|
||||||
(! Context::getContext ().config.getBoolean ("recurrence.confirmation") ||
|
((Context::getContext ().config.get ("recurrence.confirmation") == "prompt"
|
||||||
confirm (STRING_CMD_MODIFY_RECUR)))
|
&& confirm (STRING_CMD_MODIFY_RECUR)) ||
|
||||||
|
Context::getContext ().config.getBoolean ("recurrence.confirmation")))
|
||||||
{
|
{
|
||||||
for (auto& child : children)
|
for (auto& child : children)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user