From 4f2e1725617755adec305cd483cfdb3cf38fdd62 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Mon, 12 Jan 2015 12:10:56 -0600 Subject: [PATCH] A partial fix for issue #2530, which will makes the bonjour dialog put the port number in the string. --- lib/Slic3r/GUI/BonjourBrowser.pm | 4 ++++ lib/Slic3r/GUI/Tab.pm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/BonjourBrowser.pm b/lib/Slic3r/GUI/BonjourBrowser.pm index 281277768..21966d6e8 100644 --- a/lib/Slic3r/GUI/BonjourBrowser.pm +++ b/lib/Slic3r/GUI/BonjourBrowser.pm @@ -47,5 +47,9 @@ sub GetValue { my ($self) = @_; return $self->{devices}[ $self->{choice}->GetSelection ]->address; } +sub GetPort { + my ($self) = @_; + return $self->{devices}[ $self->{choice}->GetSelection ]->port; +} 1; diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index e979540d3..52cfa510f 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -1015,7 +1015,7 @@ sub build { EVT_BUTTON($self, $btn, sub { my $dlg = Slic3r::GUI::BonjourBrowser->new($self); if ($dlg->ShowModal == wxID_OK) { - my $value = $dlg->GetValue; + my $value = $dlg->GetValue . ":" . $dlg->GetPort; $self->{config}->set('octoprint_host', $value); $self->update_dirty; $self->_on_value_change('octoprint_host', $value);