diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 8ed184fc4..a431021e7 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -92,7 +92,7 @@ our $Settings = { threads => $Slic3r::Config::Options->{threads}{default}, color_toolpaths_by => 'role', tabbed_preset_editors => 1, - show_host => 0, + show_host => 1, nudge_val => 1, extended_gui => 0, reload_hide_dialog => 0, diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index 629334c3b..dd066a1b3 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -100,7 +100,7 @@ sub _init_tabpanel { $panel->OnActivate if $panel->can('OnActivate'); if ($self->{tabpanel}->GetSelection > 1) { $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); - } elsif(($Slic3r::GUI::Settings->{_}{show_host} == 0) && ($self->{tabpanel}->GetSelection == 1)){ + } elsif(!$Slic3r::GUI::Settings->{_}{show_host} && ($self->{tabpanel}->GetSelection == 1)){ $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); } else { $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag & ~wxAUI_NB_CLOSE_ON_ACTIVE_TAB); @@ -290,7 +290,17 @@ sub _init_menubar { $self->select_tab(0); }, undef, 'application_view_tile.png'); wxTheApp->append_menu_item($windowMenu, "&Controller\tCtrl+Y", 'Show the printer controller', sub { - $self->select_tab(1); + if ($Slic3r::GUI::Settings->{_}{show_host}) { + $self->select_tab(1); + } else { + my $confirm = Wx::MessageDialog->new($self, "The printer controller is currently disabled in the preferences. Do you want to enable it?", + 'Controller', wxICON_QUESTION | wxYES_NO | wxYES_DEFAULT); + if ($confirm->ShowModal == wxID_YES) { + $Slic3r::GUI::Settings->{_}{show_host} = 1; + wxTheApp->save_settings; + Slic3r::GUI::show_info($self, "The controller is now enabled. You must restart Slic3r now to make the change effective.", "Controller"); + } + } }, undef, 'printer_empty.png'); wxTheApp->append_menu_item($windowMenu, "DLP Projector…\tCtrl+P", 'Open projector window for DLP printing', sub { $self->{plater}->pause_background_process; diff --git a/src/GUI/Settings.hpp b/src/GUI/Settings.hpp index d5b7b07be..06a395707 100644 --- a/src/GUI/Settings.hpp +++ b/src/GUI/Settings.hpp @@ -26,7 +26,7 @@ enum class ReloadBehavior { /// TODO: Incorporate the system from libslic3r class Settings { public: - bool show_host {false}; + bool show_host {true}; bool version_check {true}; bool autocenter {true}; bool autoalignz {true};