From: Jonathan Nieder Date: Sat, 6 Mar 2010 22:58:42 +0000 (-0600) Subject: gitk: Don't clobber "Remember this view" setting X-Git-Tag: v1.7.1-rc2~6^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5d11f794de3c1a5cd592af008a369a90fa30d2e9;p=git.git 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 Signed-off-by: Jonathan Nieder Signed-off-by: Paul Mackerras --- diff --git a/gitk b/gitk index 140fe1f39..8a4f72753 100755 --- a/gitk +++ b/gitk @@ -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"] } @@ -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)" }