Skip to content

Commit

Permalink
Merge pull request #1244 from GenericMappingTools/fix-info-again
Browse files Browse the repository at this point in the history
Fix again the info() function.
  • Loading branch information
joa-quim authored Sep 2, 2023
2 parents 7484c5a + b7e7365 commit 5aeff12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gmt_main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,9 @@ function info(D::GDtype; crs::Bool=false, attribs=false, att::StrSymb="")
crs && return isa(D, Vector) ? print_crs(D[1]) : print_crs(D) # Report projection info and return

(attribs == false) && (_D = isa(D, Vector) ? D[1] : D)
(attribs == false && att == "") && return isempty(_D.attrib) ? show(_D) : show(_D, attrib_table=make_attrtbl(D, false))
(attribs == false && att == "" && isempty(_D.attrib)) && return show(_D)
(attribs == false && att == "") && (t = make_attrtbl(D, false);
return isa(t, Tuple) ? show(_D, attrib_table=t[1]) : show(_D, attrib_table=t))

# OK, here we are dealing with printing the attribs, or returning a column with the values of one attrib.
(attribs == false && att != "") && (attribs = true)
Expand Down

0 comments on commit 5aeff12

Please sign in to comment.