Skip to content

Commit

Permalink
fix a bug when overwrite a scale (issue #251)
Browse files Browse the repository at this point in the history
  • Loading branch information
kohske committed Nov 1, 2011
1 parent 6f723ff commit 283416b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/scales-.r
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Scales <- setRefClass("Scales", fields = "scales", methods = list(
},
add = function(scale) {
# Remove old scale for this aesthetic (if it exists)
scales <<- c(scales[!find(scale)], list(scale))
scales <<- c(scales[!find(scale$aesthetics)], list(scale))
},
clone = function() {
new_scales <- lapply(scales, scale_clone)
Expand Down

0 comments on commit 283416b

Please sign in to comment.