mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
HexEditor: Use debgln_if
This commit is contained in:
parent
b8d381690c
commit
6c618eb072
1 changed files with 3 additions and 9 deletions
|
@ -223,9 +223,7 @@ void HexEditor::mousedown_event(GUI::MouseEvent& event)
|
||||||
if (offset < 0 || offset >= static_cast<int>(m_buffer.size()))
|
if (offset < 0 || offset >= static_cast<int>(m_buffer.size()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if HEX_DEBUG
|
dbgln_if(HEX_DEBUG, "HexEditor::mousedown_event(hex): offset={}", offset);
|
||||||
outln("HexEditor::mousedown_event(hex): offset={}", offset);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_edit_mode = EditMode::Hex;
|
m_edit_mode = EditMode::Hex;
|
||||||
m_byte_position = 0;
|
m_byte_position = 0;
|
||||||
|
@ -245,9 +243,7 @@ void HexEditor::mousedown_event(GUI::MouseEvent& event)
|
||||||
if (offset < 0 || offset >= static_cast<int>(m_buffer.size()))
|
if (offset < 0 || offset >= static_cast<int>(m_buffer.size()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if HEX_DEBUG
|
dbgln_if(HEX_DEBUG, "HexEditor::mousedown_event(text): offset={}", offset);
|
||||||
outln("HexEditor::mousedown_event(text): offset={}", offset);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_position = offset;
|
m_position = offset;
|
||||||
m_byte_position = 0;
|
m_byte_position = 0;
|
||||||
|
@ -345,9 +341,7 @@ void HexEditor::scroll_position_into_view(int position)
|
||||||
|
|
||||||
void HexEditor::keydown_event(GUI::KeyEvent& event)
|
void HexEditor::keydown_event(GUI::KeyEvent& event)
|
||||||
{
|
{
|
||||||
#if HEX_DEBUG
|
dbgln_if(HEX_DEBUG, "HexEditor::keydown_event key={}", static_cast<u8>(event.key()));
|
||||||
outln("HexEditor::keydown_event key={}", static_cast<u8>(event.key()));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (event.key() == KeyCode::Key_Up) {
|
if (event.key() == KeyCode::Key_Up) {
|
||||||
if (m_position - bytes_per_row() >= 0) {
|
if (m_position - bytes_per_row() >= 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue