From 2f2cfe423e17991ae98610e9c5e8ddb55c8c275f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 19 Sep 2018 20:52:29 +0100 Subject: [PATCH] A bit of added safety regarding edit vs. display flags. --- pcbnew/dialogs/dialog_text_properties.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index 5e71484a98..ac65fcac5f 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -322,7 +322,8 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataFromWindow() // If no other command in progress, prepare undo command // (for a command in progress, will be made later, at the completion of command) - bool pushCommit = !( m_item->GetFlags() & ~SELECTED ); + int mask = EDA_ITEM_ALL_FLAGS - ( SELECTED | HIGHLIGHTED | BRIGHTENED ); + bool pushCommit = ( m_item->GetFlags() & mask ) == 0; /* set flag in edit to force undo/redo/abort proper operation, * and avoid new calls to SaveCopyInUndoList for the same text