Skip to content

Commit

Permalink
Resubscribe after change of topic or transport.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanFabian committed Aug 27, 2021
1 parent cdf0c3f commit 61fd7a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/image_transport_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,21 @@ QString ImageTransportSubscriber::topic() const
void ImageTransportSubscriber::setTopic( const QString &value )
{
if ( topic_ == value ) return;
shutdownSubscriber();
topic_ = value;
emit topicChanged();
initSubscriber();
}

const QString &ImageTransportSubscriber::defaultTransport() const { return default_transport_; }

void ImageTransportSubscriber::setDefaultTransport( const QString &value )
{
if ( default_transport_ == value ) return;
shutdownSubscriber();
default_transport_ = value;
emit defaultTransportChanged();
initSubscriber();
}

bool ImageTransportSubscriber::subscribed() const { return subscribed_; }
Expand Down

0 comments on commit 61fd7a2

Please sign in to comment.