fixes #3296

We actually need to redo these macros entirely - all logic should be in Java and they should be in viewtools.  That is for a later time, though.