mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
New GUI with plating facilities
This commit is contained in:
@@ -4,6 +4,7 @@ use warnings;
|
||||
use utf8;
|
||||
|
||||
use FindBin;
|
||||
use Slic3r::GUI::Dashboard;
|
||||
use Slic3r::GUI::OptionsGroup;
|
||||
use Slic3r::GUI::SkeinPanel;
|
||||
|
||||
@@ -65,4 +66,22 @@ sub About {
|
||||
Wx::AboutBox($info);
|
||||
}
|
||||
|
||||
sub catch_error {
|
||||
my ($self, $cb) = @_;
|
||||
if (my $err = $@) {
|
||||
$cb->() if $cb;
|
||||
Wx::MessageDialog->new($self, $err, 'Error', &Wx::wxOK | &Wx::wxICON_ERROR)->ShowModal;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub warning_catcher {
|
||||
my ($self) = @_;
|
||||
return sub {
|
||||
my $message = shift;
|
||||
Wx::MessageDialog->new($self, $message, 'Warning', &Wx::wxOK | &Wx::wxICON_WARNING)->ShowModal;
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user