File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -407,24 +407,26 @@ public ContextMenu MakeContextMenu(ListBox list)
407
407
} ;
408
408
menu . Items . Add ( reset ) ;
409
409
410
- var squash = new MenuItem ( ) ;
411
- squash . Header = App . Text ( "CommitCM.SquashCommitsSinceThis" ) ;
412
- squash . Icon = App . CreateMenuIcon ( "Icons.SquashIntoParent" ) ;
413
- squash . IsVisible = commit . IsMerged ;
414
- squash . Click += ( _ , e ) =>
410
+ if ( commit . IsMerged )
415
411
{
416
- if ( _repo . LocalChangesCount > 0 )
412
+ var squash = new MenuItem ( ) ;
413
+ squash . Header = App . Text ( "CommitCM.SquashCommitsSinceThis" ) ;
414
+ squash . Icon = App . CreateMenuIcon ( "Icons.SquashIntoParent" ) ;
415
+ squash . Click += ( _ , e ) =>
417
416
{
418
- App . RaiseException ( _repo . FullPath , "You have local changes. Please run stash or discard first." ) ;
419
- return ;
420
- }
417
+ if ( _repo . LocalChangesCount > 0 )
418
+ {
419
+ App . RaiseException ( _repo . FullPath , "You have local changes. Please run stash or discard first." ) ;
420
+ return ;
421
+ }
421
422
422
- if ( PopupHost . CanCreatePopup ( ) )
423
- PopupHost . ShowPopup ( new Squash ( _repo , commit , commit . SHA ) ) ;
423
+ if ( PopupHost . CanCreatePopup ( ) )
424
+ PopupHost . ShowPopup ( new Squash ( _repo , commit , commit . SHA ) ) ;
424
425
425
- e . Handled = true ;
426
- } ;
427
- menu . Items . Add ( squash ) ;
426
+ e . Handled = true ;
427
+ } ;
428
+ menu . Items . Add ( squash ) ;
429
+ }
428
430
}
429
431
else
430
432
{
You can’t perform that action at this time.
0 commit comments