Skip to content

Commit

Permalink
Don't ignore first popup message (Klipper)
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Jan 11, 2025
1 parent fdfa2d0 commit f8ed3af
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions CYD-Klipper/src/core/printer_integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,18 @@ PrinterData* BasePrinter::AnnouncePrinterData()
lv_msg_send(DATA_PRINTER_STATE, get_current_printer());
}

if (old_popup_message != printer_data_copy->popup_message && old_popup_message != NULL && old_popup_message != blank && !no_free)
if (old_popup_message != printer_data_copy->popup_message)
{
LOG_F(("Freeing popup message '%s' (%x)\n", old_popup_message, old_popup_message));
free(old_popup_message);
lv_msg_send(DATA_PRINTER_POPUP, get_current_printer());
if (old_popup_message != NULL && old_popup_message != blank && !no_free)
{
LOG_F(("Freeing popup message '%s' (%x)\n", old_popup_message, old_popup_message));
free(old_popup_message);
}

if (printer_data_copy->popup_message != NULL && printer_data_copy->popup_message != blank)
{
lv_msg_send(DATA_PRINTER_POPUP, get_current_printer());
}
}

lv_msg_send(DATA_PRINTER_DATA, get_current_printer());
Expand Down

0 comments on commit f8ed3af

Please sign in to comment.