mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 22:24:01 -06:00
PreferencesDialog moved to C++ part
This commit is contained in:
parent
916378097c
commit
3d805a0f43
7 changed files with 45 additions and 3 deletions
|
@ -69,7 +69,9 @@ our $grey = Wx::Colour->new(200,200,200);
|
|||
|
||||
# Events to be sent from a C++ menu implementation:
|
||||
# 1) To inform about a change of the application language.
|
||||
our $LANGUAGE_CHANGE_EVENT = Wx::NewEventType;
|
||||
our $LANGUAGE_CHANGE_EVENT = Wx::NewEventType;
|
||||
# 2) To inform about a change of Preferences.
|
||||
our $PREFERENCES_EVENT = Wx::NewEventType;
|
||||
|
||||
sub OnInit {
|
||||
my ($self) = @_;
|
||||
|
@ -122,6 +124,7 @@ sub OnInit {
|
|||
no_controller => $self->{app_config}->get('no_controller'),
|
||||
no_plater => $no_plater,
|
||||
lang_ch_event => $LANGUAGE_CHANGE_EVENT,
|
||||
preferences_event => $PREFERENCES_EVENT,
|
||||
);
|
||||
$self->SetTopWindow($frame);
|
||||
|
||||
|
@ -146,6 +149,11 @@ sub OnInit {
|
|||
EVT_COMMAND($self, -1, $LANGUAGE_CHANGE_EVENT, sub{
|
||||
$self->recreate_GUI;
|
||||
});
|
||||
|
||||
# The following event is emited by the C++ menu implementation of preferences change.
|
||||
EVT_COMMAND($self, -1, $PREFERENCES_EVENT, sub{
|
||||
$self->update_ui_from_settings;
|
||||
});
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -158,6 +166,7 @@ sub recreate_GUI{
|
|||
no_controller => $self->{app_config}->get('no_controller'),
|
||||
no_plater => $no_plater,
|
||||
lang_ch_event => $LANGUAGE_CHANGE_EVENT,
|
||||
preferences_event => $PREFERENCES_EVENT,
|
||||
);
|
||||
|
||||
if($topwindow)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue