@@ -314,6 +314,10 @@ private void CreateGUI()
314314 tooltip = "Add External File or Folder" ,
315315 style = { flexShrink = 0 }
316316 } ;
317+ toolbarMenu . menu . AppendAction ( "Add Selected Objects" , _ => AddSelectedObjects ( ) ,
318+ _ => Selection . objects != null && Selection . objects . Length > 0
319+ ? DropdownMenuAction . Status . Normal
320+ : DropdownMenuAction . Status . Disabled ) ;
317321 toolbarMenu . menu . AppendAction ( "Add External File" , AddExternalFile ) ;
318322 toolbarMenu . menu . AppendAction ( "Add External Folder" , AddExternalFolder ) ;
319323 toolbarMenu . menu . AppendAction ( "Add Menu Item" , AddMenuItemEditor ) ;
@@ -514,24 +518,24 @@ private void AddUrlEditor(DropdownMenuAction action)
514518 UrlEditWindow . Open ( upperCenter , AddUrl ) ;
515519 }
516520
517- private void AddMenuItem ( string menuPath , string title )
521+ private void AddMenuItem ( string menuPath , string menuTitle )
518522 {
519523 if ( string . IsNullOrWhiteSpace ( menuPath ) )
520524 {
521525 return ;
522526 }
523527
524- AddItems ( null , null , null , new ( string menuPath , string title ) [ ] { ( menuPath , title ) } ) ;
528+ AddItems ( null , null , null , new ( string menuPath , string title ) [ ] { ( menuPath , menuTitle ) } ) ;
525529 }
526530
527- private void AddUrl ( string url , string title )
531+ private void AddUrl ( string url , string menuTitle )
528532 {
529533 if ( string . IsNullOrWhiteSpace ( url ) )
530534 {
531535 return ;
532536 }
533537
534- AddItems ( null , null , new ( string url , string title ) [ ] { ( url , title ) } , null ) ;
538+ AddItems ( null , null , new ( string url , string title ) [ ] { ( url , menuTitle ) } , null ) ;
535539 }
536540
537541 #endregion
0 commit comments