On Sat, Mar 22, 2014 at 9:13 AM, Anton Lundin <[email protected]> wrote:
> Just treat it as a cancel instead.
>
> Signed-off-by: Anton Lundin <[email protected]>
> ---
>  qt-ui/diveplanner.cpp | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
> index da5bb53..ac2662c 100644
> --- a/qt-ui/diveplanner.cpp
> +++ b/qt-ui/diveplanner.cpp
> @@ -1468,6 +1468,9 @@ void DivePlannerPointsModel::createPlan()
>         char *cache = NULL;
>         tempDive = NULL;
>
> +       if (!diveplan.dp)
> +               return cancelPlan();
> +
>         createTemporaryPlan();
>         plan(&diveplan, &cache, &tempDive, isPlanner());
>         copy_cylinders(stagingDive, tempDive);
> --
Instead of cancelling the plan, which sets the Mode to NOTHING, i.e.
user has to click on "New Plan" again, wouldn't it be better and
useful to add the following "if" statement, instead of the above one
     if (!rowCount()) return;
This way, Mode is not changed, and user can still be in PLAN mode,
i.e. same window.

Thank you,
Lakshman
_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to