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)
407407 } ;
408408 menu . Items . Add ( reset ) ;
409409
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 )
415411 {
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 ) =>
417416 {
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+ }
421422
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 ) ) ;
424425
425- e . Handled = true ;
426- } ;
427- menu . Items . Add ( squash ) ;
426+ e . Handled = true ;
427+ } ;
428+ menu . Items . Add ( squash ) ;
429+ }
428430 }
429431 else
430432 {
You can’t perform that action at this time.
0 commit comments