mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06:00
Fixed camera shifting after generating gcode
This commit is contained in:
parent
ac904b2731
commit
7375f6a6f5
4 changed files with 17 additions and 1 deletions
|
@ -2211,26 +2211,31 @@ void _3DScene::_update_gcode_volumes_visibility(const GCodePreviewData& preview_
|
|||
case GCodePreviewVolumeIndex::Travel:
|
||||
{
|
||||
volume->is_active = preview_data.travel.is_visible;
|
||||
volume->zoom_to_volumes = false;
|
||||
break;
|
||||
}
|
||||
case GCodePreviewVolumeIndex::Retraction:
|
||||
{
|
||||
volume->is_active = preview_data.retraction.is_visible;
|
||||
volume->zoom_to_volumes = false;
|
||||
break;
|
||||
}
|
||||
case GCodePreviewVolumeIndex::Unretraction:
|
||||
{
|
||||
volume->is_active = preview_data.unretraction.is_visible;
|
||||
volume->zoom_to_volumes = false;
|
||||
break;
|
||||
}
|
||||
case GCodePreviewVolumeIndex::Shell:
|
||||
{
|
||||
volume->is_active = preview_data.shell.is_visible;
|
||||
volume->zoom_to_volumes = false;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
volume->is_active = false;
|
||||
volume->zoom_to_volumes = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,6 +215,7 @@ public:
|
|||
drag_group_id(-1),
|
||||
selected(false),
|
||||
is_active(true),
|
||||
zoom_to_volumes(true),
|
||||
hover(false),
|
||||
tverts_range(0, size_t(-1)),
|
||||
qverts_range(0, size_t(-1))
|
||||
|
@ -253,6 +254,8 @@ public:
|
|||
bool selected;
|
||||
// Whether or not this volume is active for rendering
|
||||
bool is_active;
|
||||
// Whether or not to use this volume when applying zoom_to_volumes()
|
||||
bool zoom_to_volumes;
|
||||
// Boolean: Is mouse over this object?
|
||||
bool hover;
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
%code%{ RETVAL = THIS->hover; %};
|
||||
void set_hover(int i)
|
||||
%code%{ THIS->hover = i; %};
|
||||
int zoom_to_volumes()
|
||||
%code%{ RETVAL = THIS->zoom_to_volumes; %};
|
||||
|
||||
int object_idx() const;
|
||||
int volume_idx() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue