From ce7c5ed525bb06fbe43a44ab5ba40d0aa2e35dcf Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 21 Jan 2025 16:26:28 -0600 Subject: [PATCH] clarify cStringChoice cancel behavior --- src/dialogxml/dialogs/strchoice.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dialogxml/dialogs/strchoice.hpp b/src/dialogxml/dialogs/strchoice.hpp index 53bcab64..f11e9163 100644 --- a/src/dialogxml/dialogs/strchoice.hpp +++ b/src/dialogxml/dialogs/strchoice.hpp @@ -52,7 +52,8 @@ public: cDialog* operator->(); /// Show the dialog. /// @param selectedIndex The index of the string that should be initially selected when the dialog is shown. - /// @return The index of the newly selected string; if the user cancelled, this will be equal to selectedIndex. + /// @return The index of the newly selected string; if the user cancelled, this will be equal to the initial + /// selectedIndex you provide. (So, pass -1 or something to signify that cancelling means the result is invalid.) /// If initialized from an iterator range, this will be relative to begin. size_t show(size_t selectedIndex); };