Skip to content

Commit 5d11f79

Browse files
jrnpaulusmack
authored andcommitted
gitk: Don't clobber "Remember this view" setting
In the View → Edit View... dialog, the "Remember this view" option always starts out unset. Using the dialog to change an existing view and ignoring the parts of the dialog that aren’t relevant results in both the old and new versions of the view being lost. The cause: right after newviewopts($curview,perm) is set to an appropriate value, decode_view_opts is clobbering it with the default value. If that call is moved a little earlier, the "Remember this view" option gets properly set to its previous value, fixing the problem. Reported-by: Steve Cotton <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent e7feb69 commit 5d11f79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3811,10 +3811,10 @@ proc newview {ishighlight} {
38113811
raise $top
38123812
return
38133813
}
3814+
decode_view_opts $nextviewnum $revtreeargs
38143815
set newviewname($nextviewnum) "[mc "View"] $nextviewnum"
38153816
set newviewopts($nextviewnum,perm) 0
38163817
set newviewopts($nextviewnum,cmd) $viewargscmd($curview)
3817-
decode_view_opts $nextviewnum $revtreeargs
38183818
vieweditor $top $nextviewnum [mc "Gitk view definition"]
38193819
}
38203820

@@ -3968,10 +3968,10 @@ proc editview {} {
39683968
raise $top
39693969
return
39703970
}
3971+
decode_view_opts $curview $viewargs($curview)
39713972
set newviewname($curview) $viewname($curview)
39723973
set newviewopts($curview,perm) $viewperm($curview)
39733974
set newviewopts($curview,cmd) $viewargscmd($curview)
3974-
decode_view_opts $curview $viewargs($curview)
39753975
vieweditor $top $curview "[mc "Gitk: edit view"] $viewname($curview)"
39763976
}
39773977

0 commit comments

Comments
 (0)