From adb89afe6c9a1faebbacc61d782fca78a1e15a83 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 18 Sep 2018 03:52:15 -0700 Subject: [PATCH] Allow SELECTED for single edits We like to allow items that are marked SELECTED to remain so during editing but this does not indicate that there are multiple edits queued, so do not prevent pushing this into the undo queue. --- pcbnew/dialogs/dialog_text_properties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index 180ec789c6..5e71484a98 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -322,13 +322,13 @@ 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() == 0 ); + bool pushCommit = !( m_item->GetFlags() & ~SELECTED ); /* set flag in edit to force undo/redo/abort proper operation, * and avoid new calls to SaveCopyInUndoList for the same text * this can occurs when a text is moved, and then rotated, edited .. */ - if( m_item->GetFlags() != 0 ) + if( !pushCommit ) m_item->SetFlags( IN_EDIT ); #ifndef USE_WX_OVERLAY