mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Disable the OctoPrint test button when LWP::UserAgent is not available
This commit is contained in:
		
							parent
							
								
									24daa50bfd
								
							
						
					
					
						commit
						9f4f711017
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		|  | @ -1034,10 +1034,6 @@ sub build { | ||||||
|                     $btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/wrench.png", wxBITMAP_TYPE_PNG)); |                     $btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/wrench.png", wxBITMAP_TYPE_PNG)); | ||||||
|                 } |                 } | ||||||
|                  |                  | ||||||
|                 if (!eval "use LWP::UserAgent; 1") { |  | ||||||
|                     $btn->Disable; |  | ||||||
|                 } |  | ||||||
|                  |  | ||||||
|                 EVT_BUTTON($self, $btn, sub { |                 EVT_BUTTON($self, $btn, sub { | ||||||
|                     my $ua = LWP::UserAgent->new; |                     my $ua = LWP::UserAgent->new; | ||||||
|                     $ua->timeout(10); |                     $ua->timeout(10); | ||||||
|  | @ -1202,7 +1198,7 @@ sub _update { | ||||||
|      |      | ||||||
|     my $config = $self->{config}; |     my $config = $self->{config}; | ||||||
|      |      | ||||||
|     if ($config->get('octoprint_host')) { |     if ($config->get('octoprint_host') && eval "use LWP::UserAgent; 1") { | ||||||
|         $self->{octoprint_host_test_btn}->Enable; |         $self->{octoprint_host_test_btn}->Enable; | ||||||
|     } else { |     } else { | ||||||
|         $self->{octoprint_host_test_btn}->Disable; |         $self->{octoprint_host_test_btn}->Disable; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci