Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ScreensPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ static const char* const DynamicFunctions[] = {" ", "Rename", " ", "

static void ScreensPanel_delete(Object* object) {
Panel* super = (Panel*) object;
ScreensPanel* const this = (ScreensPanel*) super;

/* cancel any pending edit action */
if (this->renamingItem) {
ListItem* item = (ListItem*) Panel_getSelected(super);
assert(item);
assert(item == this->renamingItem);

item->value = this->saved;
this->renamingItem = NULL;
super->cursorOn = false;

Panel_setSelectionColor(super, PANEL_SELECTION_FOCUS);
}

/* do not delete screen settings still in use */
int n = Panel_size(super);
Expand Down
Loading