New GUI with plating facilities

This commit is contained in:
Alessandro Ranellucci 2012-04-30 14:56:01 +02:00
parent 4bc49dcc5b
commit d03925a18d
16 changed files with 1143 additions and 581 deletions
lib/Slic3r

View file

@ -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;