forked from qt-creator/qt-creator
Fix state of LineColumButton after clicking
When using the `pressed` signal, the button stays in the "pressed" state forever afterwards. Using the `clicked` signal behaves correctly, so use that instead. Change-Id: I646c93f1db3b1176630f1cfa718aba01d0aaf252 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -157,7 +157,7 @@ public:
|
|||||||
, m_editor(parent)
|
, m_editor(parent)
|
||||||
{
|
{
|
||||||
connect(m_editor, &QPlainTextEdit::cursorPositionChanged, this, &LineColumnButton::update);
|
connect(m_editor, &QPlainTextEdit::cursorPositionChanged, this, &LineColumnButton::update);
|
||||||
connect(this, &QToolButton::pressed, ActionManager::instance(), [this] {
|
connect(this, &QToolButton::clicked, ActionManager::instance(), [this] {
|
||||||
emit m_editor->activateEditor(EditorManager::IgnoreNavigationHistory);
|
emit m_editor->activateEditor(EditorManager::IgnoreNavigationHistory);
|
||||||
QMetaObject::invokeMethod(ActionManager::instance(), [] {
|
QMetaObject::invokeMethod(ActionManager::instance(), [] {
|
||||||
if (Command *cmd = ActionManager::command(Core::Constants::GOTO)) {
|
if (Command *cmd = ActionManager::command(Core::Constants::GOTO)) {
|
||||||
|
Reference in New Issue
Block a user