Explorar o código

UI: If users renames a source, only revert on Esc

Fixes a design flaw where if renaming a source, the source's name would
revert if you de-focused (clicked away) from the rename edit widget.
Instead, the functionality for revert should really only just be when
the user presses the Escape key.
jp9000 %!s(int64=7) %!d(string=hai) anos
pai
achega
fb58bcf75f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      UI/source-tree.cpp

+ 1 - 1
UI/source-tree.cpp

@@ -321,7 +321,7 @@ bool SourceTreeItem::eventFilter(QObject *object, QEvent *event)
 	} else if (event->type() == QEvent::FocusOut) {
 	} else if (event->type() == QEvent::FocusOut) {
 		QMetaObject::invokeMethod(this, "ExitEditMode",
 		QMetaObject::invokeMethod(this, "ExitEditMode",
 				Qt::QueuedConnection,
 				Qt::QueuedConnection,
-				Q_ARG(bool, false));
+				Q_ARG(bool, true));
 		return true;
 		return true;
 	}
 	}