Bug 642292 - General Ledger report - 'Primary Sort Key' value is not persistent

This commit is contained in:
Geert Janssens 2016-03-23 14:48:21 +01:00
parent e003cb07db
commit 0e91583754
4 changed files with 14 additions and 2 deletions

View File

@ -75,6 +75,7 @@
(export gnc:option-value-get-index) (export gnc:option-value-get-index)
(export gnc:option-number-of-indices) (export gnc:option-number-of-indices)
(export gnc:option-default-value) (export gnc:option-default-value)
(export gnc:option-set-default-value)
(export gnc:restore-form-generator) (export gnc:restore-form-generator)
(export gnc:value->string) (export gnc:value->string)
(export gnc:make-string-option) (export gnc:make-string-option)

View File

@ -177,6 +177,17 @@
(let ((getter (gnc:option-default-getter option))) (let ((getter (gnc:option-default-getter option)))
(getter))) (getter)))
;; Attention: this function can only be used with restrictions
;; - only during option generation, not in arbitrary code
;; - only for option types for which no conversion is required
;; between default-value and value. In the various gnc:make-option
;; functions below this is ok when
;; 1. there's (value default-value) in the let* call
;; 2. default-getter is set to (lambda() default-value)
(define (gnc:option-set-default-value option default-value)
(vector-set! option 7 (lambda() default-value))
(gnc:option-set-value option default-value))
(define (gnc:restore-form-generator value->string) (define (gnc:restore-form-generator value->string)
(lambda () (string-append (lambda () (string-append

View File

@ -53,7 +53,7 @@
) )
(define (set-option! section name value) (define (set-option! section name value)
(gnc:option-set-value (gnc:option-set-default-value
(gnc:lookup-option options section name) value)) (gnc:lookup-option options section name) value))
;; Match, by default, all non-void transactions ever recorded in ;; Match, by default, all non-void transactions ever recorded in

View File

@ -57,7 +57,7 @@
(define pagename-sorting (N_ "Sorting")) (define pagename-sorting (N_ "Sorting"))
(define (set-option! section name value) (define (set-option! section name value)
(gnc:option-set-value (gnc:option-set-default-value
(gnc:lookup-option options section name) value)) (gnc:lookup-option options section name) value))
;; set options in the accounts tab... ;; set options in the accounts tab...