App: Add None=0 to enumeration

Addresses Coverity CID 356649, uninitialized scalar.
This commit is contained in:
Chris Hennes
2023-02-25 19:31:01 -06:00
committed by Chris Hennes
parent de78e9d7ef
commit e3544117ab
2 changed files with 3 additions and 1 deletions

View File

@@ -332,6 +332,8 @@ public:
* Multiple options can be combined by bitwise or operator
*/
enum class OnChangeCopyOptions {
/// No options set
None = 0,
/// If set, then exclude the input from object list to copy on change, or else, include the input object.
Exclude = 1,
/// If set , then apply the setting to all links to the input object, or else, apply only to this link.

View File

@@ -2447,7 +2447,7 @@ void ViewProviderLink::setupContextMenu(QMenu* menu, QObject* receiver, const ch
bool applyAll = box->isChecked();
App::LinkParams::setCopyOnChangeApplyToAll(applyAll);
App::Link::OnChangeCopyOptions options;
App::Link::OnChangeCopyOptions options {App::Link::OnChangeCopyOptions::None};
if (applyAll)
options |= App::Link::OnChangeCopyOptions::ApplyAll;