Skip to content

Commit

Permalink
gitk: Don't clobber "Remember this view" setting
Browse files Browse the repository at this point in the history
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 <steve0001@s.cotton.clara.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Jonathan Nieder authored and Paul Mackerras committed Mar 20, 2010
1 parent e7feb69 commit 5d11f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -3811,10 +3811,10 @@ proc newview {ishighlight} {
raise $top
return
}
decode_view_opts $nextviewnum $revtreeargs
set newviewname($nextviewnum) "[mc "View"] $nextviewnum"
set newviewopts($nextviewnum,perm) 0
set newviewopts($nextviewnum,cmd) $viewargscmd($curview)
decode_view_opts $nextviewnum $revtreeargs
vieweditor $top $nextviewnum [mc "Gitk view definition"]
}

Expand Down Expand Up @@ -3968,10 +3968,10 @@ proc editview {} {
raise $top
return
}
decode_view_opts $curview $viewargs($curview)
set newviewname($curview) $viewname($curview)
set newviewopts($curview,perm) $viewperm($curview)
set newviewopts($curview,cmd) $viewargscmd($curview)
decode_view_opts $curview $viewargs($curview)
vieweditor $top $curview "[mc "Gitk: edit view"] $viewname($curview)"
}

Expand Down

0 comments on commit 5d11f79

Please sign in to comment.