mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
Warn user if supplied preset name is not valid
This commit is contained in:
@@ -535,8 +535,12 @@ sub new {
|
|||||||
sub accept {
|
sub accept {
|
||||||
my ($self, $event) = @_;
|
my ($self, $event) = @_;
|
||||||
|
|
||||||
if (($self->{chosen_name} = $self->{combo}->GetValue) && $self->{chosen_name} =~ /^[a-z0-9 _-]+$/i) {
|
if (($self->{chosen_name} = $self->{combo}->GetValue)) {
|
||||||
$self->EndModal(wxID_OK);
|
if ($self->{chosen_name} =~ /^[a-z0-9 _-]+$/i) {
|
||||||
|
$self->EndModal(wxID_OK);
|
||||||
|
} else {
|
||||||
|
Slic3r::GUI::show_error($self, "The supplied name is not valid.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user