Add helper AcceptCellEditControlIfShown() function

This is just another refactoring in order to avoid duplicating calls to
HideCellEditControl() and SaveEditControlValue() in several different
places.

Also call DoSaveEditControlValue() because if the editor is shown, it is
also necessarily enabled and there is no need to check for this.
This commit is contained in:
Vadim Zeitlin
2020-06-27 16:57:40 +02:00
parent 0fb153a2bd
commit 3a874471c3
2 changed files with 18 additions and 23 deletions

View File

@@ -2908,6 +2908,10 @@ private:
);
}
// Accept the changes in the edit control, if it's currently shown, and
// dismiss it.
void AcceptCellEditControlIfShown();
// Unlike the public SaveEditControlValue(), this method doesn't check if
// the edit control is shown, but just supposes that it is.
void DoSaveEditControlValue();