Move on bed(text could change Z coordinate of the object)
This commit is contained in:
parent
d3ee9b37ec
commit
262970d332
1 changed files with 11 additions and 5 deletions
|
@ -524,8 +524,11 @@ void UpdateJob::update_volume(ModelVolume *volume,
|
||||||
obj_list->update_name_in_list(object_idx, volume_idx);
|
obj_list->update_name_in_list(object_idx, volume_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move object on bed
|
// When text is object.
|
||||||
if (GLGizmoEmboss::is_text_object(volume)) volume->get_object()->ensure_on_bed();
|
// When text positive volume is lowest part of object than modification of text
|
||||||
|
// have to move object on bed.
|
||||||
|
if (volume->type() == ModelVolumeType::MODEL_PART)
|
||||||
|
volume->get_object()->ensure_on_bed();
|
||||||
|
|
||||||
// redraw scene
|
// redraw scene
|
||||||
bool refresh_immediately = false;
|
bool refresh_immediately = false;
|
||||||
|
@ -617,6 +620,12 @@ void priv::create_volume(
|
||||||
volume->text_configuration = data.text_configuration; // copy
|
volume->text_configuration = data.text_configuration; // copy
|
||||||
volume->set_transformation(trmat);
|
volume->set_transformation(trmat);
|
||||||
|
|
||||||
|
// update printable state on canvas
|
||||||
|
if (type == ModelVolumeType::MODEL_PART) {
|
||||||
|
volume->get_object()->ensure_on_bed();
|
||||||
|
canvas->update_instance_printable_state_for_object(object_idx);
|
||||||
|
}
|
||||||
|
|
||||||
// update volume name in object list
|
// update volume name in object list
|
||||||
// updata selection after new volume added
|
// updata selection after new volume added
|
||||||
// change name of volume in right panel
|
// change name of volume in right panel
|
||||||
|
@ -626,9 +635,6 @@ void priv::create_volume(
|
||||||
wxDataViewItemArray sel = obj_list->reorder_volumes_and_get_selection(object_idx, add_to_selection);
|
wxDataViewItemArray sel = obj_list->reorder_volumes_and_get_selection(object_idx, add_to_selection);
|
||||||
if (!sel.IsEmpty()) obj_list->select_item(sel.front());
|
if (!sel.IsEmpty()) obj_list->select_item(sel.front());
|
||||||
|
|
||||||
// update printable state on canvas
|
|
||||||
if (type == ModelVolumeType::MODEL_PART) canvas->update_instance_printable_state_for_object(object_idx);
|
|
||||||
|
|
||||||
obj_list->selection_changed();
|
obj_list->selection_changed();
|
||||||
|
|
||||||
// Now is valid text volume selected open emboss gizmo
|
// Now is valid text volume selected open emboss gizmo
|
||||||
|
|
Loading…
Reference in a new issue