Fixed bug in hex display window

I added calls to update the hexidecimal display window, which could
cause a discrepancy between the line edit's selection and the selection
in the hex window. (There are also code formatting changes in this
commit.)