mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 16:29:01 +08:00
Fixes related to Face Rotation (#4437)
* Adjust size of icon to match others * Make the rotate button disabled if a face is not selected * Fix color issue
This commit is contained in:
parent
9856947d45
commit
ff3234d8f0
@ -1112,6 +1112,7 @@ sub draw_volumes {
|
||||
$min_offset //= 0;
|
||||
$max_offset //= $volume->qverts->size;
|
||||
|
||||
glColor4f(@baseColor);
|
||||
glVertexPointer_c(3, GL_FLOAT, 0, $volume->qverts->verts_ptr);
|
||||
glNormalPointer_c(GL_FLOAT, 0, $volume->qverts->norms_ptr);
|
||||
glDrawArrays(GL_QUADS, $min_offset / 3, ($max_offset-$min_offset) / 3);
|
||||
|
@ -54,6 +54,7 @@ sub new {
|
||||
|
||||
$self->{btn_rot} = Wx::Button->new($self, -1, "Rotate to Plane", wxDefaultPosition, wxDefaultSize);
|
||||
$self->{btn_rot}->SetDefault;
|
||||
$self->{btn_rot}->Disable;
|
||||
$button_sizer->Add($self->{btn_rot}, 0, wxALIGN_RIGHT | wxALL, 10);
|
||||
$optgroup->append_line(Slic3r::GUI::OptionsGroup::Line->new(
|
||||
sizer => $button_sizer,
|
||||
@ -77,7 +78,9 @@ sub new {
|
||||
$canvas->zoom_to_volumes;
|
||||
$canvas->on_select(sub {
|
||||
my ($volume_idx) = @_;
|
||||
$self->{btn_rot}->Disable;
|
||||
$self->{normal} = $canvas->calculate_normal($volume_idx);
|
||||
$self->{btn_rot}->Enable if defined $self->{normal};
|
||||
});
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 478 B |
Loading…
x
Reference in New Issue
Block a user