EUA / wxHexEditor

wxHexEditor official GIT repo
http://www.wxhexeditor.org
GNU General Public License v2.0
558 stars 118 forks source link

Change "Cursor Value" to "Selected Block Value" when multiple blocks are selected #208

Closed schrmh closed 11 months ago

schrmh commented 1 year ago

image When selecting multiple blocks, the cursor value converting the hexadecimal to decimal becomes 0. Instead if should display a value for the block that can be defined e.g. via Options and cycled trough via a left click (similar to left-clicing on the Offset pane to switch notation there). In this case useful notations are for example 32-bit floating-point numbers (IEEE 754 standard) in big and little endian. So for example, for little endian in this case (00 00 28 43) it should display 168.

EUA commented 11 months ago

Yeah, it's a cosmetic bug. It should need to show 67 (43h) instead of zero since cursor is on top of it.

But interpretation to 168 is no go. Because it might be 4 byte integer also. Who define this? So DataInterpreter pane is here for this job, also allows little and big endian notations.

Currently, dataInterpreteer module is also start interpreting form current cursor location, not selected block location... This request is only meaningful for that module.

EUA commented 11 months ago

Fixed the cosmetic. I think current style is ok.

schrmh commented 11 months ago

Ah the reason I requested it like that was that it would be more convenient for me if such a feature was there cause I usually just need exactly this interpretation (32-bit floating-point numbers in little endian) if it isn't a color value + the cursor offset (that is already displayed there).

Well, I guess I will instead open two issues to get a similar thing using the DataInspector. Well or maybe three, cause color could be displayed there I guess?

EUA commented 11 months ago

Yeah, but I just make this program for myself. If you really like such an option, you can a it, this why I leave source open. Since I don't see any benefit to do it for the community, I mark this as wontfix...

You can edit line 1475 at HexEditor.cpp to alter statusbar->SetStatusText(wxString::Format(_("Cursor Value: %u"), cursor_value), 2); code which changes the Cursor value, this is what I can do for you at most.