diff options
-rw-r--r-- | src/bench/hostwidget.cpp | 10 | ||||
-rw-r--r-- | src/bench/hostwidget.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/bench/hostwidget.cpp b/src/bench/hostwidget.cpp index 0da4f24..b9da0be 100644 --- a/src/bench/hostwidget.cpp +++ b/src/bench/hostwidget.cpp @@ -136,7 +136,7 @@ void HostWidget::setHost(Host *host) connect(host, SIGNAL(yOffsetChanged(int)), this, SLOT(sendYOffset(int))); connect(host, SIGNAL(rotationChanged(int)), this, SLOT(sendRotation(int))); connect(host, SIGNAL(followTreeSelectionChanged(bool)), - m_followTreeSelectionAction, SLOT(setChecked(bool))); + this, SLOT(updateFollowTreeSelection(bool))); connect(m_followTreeSelectionAction, SIGNAL(triggered(bool)), host, SLOT(setFollowTreeSelection(bool))); } @@ -219,6 +219,14 @@ void HostWidget::updateOnlineState(bool online) onDisconnected(); } +void HostWidget::updateFollowTreeSelection(bool follow) +{ + m_followTreeSelectionAction->setChecked(follow); + + if (follow) + m_host->setCurrentFile(m_engine->activePath()); +} + void HostWidget::connectToServer() { qDebug() << "connectToServer"; diff --git a/src/bench/hostwidget.h b/src/bench/hostwidget.h index 42188e7..b5470e7 100644 --- a/src/bench/hostwidget.h +++ b/src/bench/hostwidget.h @@ -71,6 +71,7 @@ private slots: void updateFile(const QString& file); void setUpdateFile(const QString& file); void updateOnlineState(bool online); + void updateFollowTreeSelection(bool follow); void connectToServer(); void connectAndSendFile(); |