-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TuneUp menu item should be under Extensions menu. #39
Conversation
TuneUp/TuneUpViewExtension.cs
Outdated
@@ -49,7 +49,7 @@ public void Loaded(ViewLoadedParams p) | |||
} | |||
|
|||
}; | |||
p.AddMenuItem(MenuBarType.View, TuneUpMenuItem); | |||
p.AddExtensionMenuItem(TuneUpMenuItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm can you test loading this view ex in legacy version of Dynamo? I think part of the AC is that if user download newer version of TuneUp in older version of Dynamo e.g. 2.6.1, Dynamo should not crash when loading TuneUp. This code may crash in older version of Dynamo, we may need to wrap this code in try catch and fall back to the older version of API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address this issue in the latest commit.
@QilongTang After discussing with @mjkkirschner, found out that by using Dynamic ViewLoadedParams object we can call the respective API's. Tested it on latest master as well as older versions of Dynamo. |
{ | ||
dynamic dp = (dynamic) p; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add comments to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment then LGTM
Addressed all comments. Merging this. |
When TuneUp package is installed, "Show TuneUp" menu item should be present under the Extensions menu.
To use the AddExtensionMenuItem API from ViewLoadedParams class, the DynamoCore references are pointed to the Dynamo 2.12 version. The TargetFrameworkVersion is also set to v4.8.