FIX: fix the object select state not correct issue when load project from drop-files
Change-Id: I6ad11ec3a96d73ac38f2f5aab74a3fcd685c0a34
This commit is contained in:
parent
0dc7f51782
commit
38406e3e59
2 changed files with 13 additions and 4 deletions
|
@ -3020,7 +3020,7 @@ int PartPlateList::select_plate(int index)
|
|||
if (m_intialized && m_plater) {
|
||||
Vec2d pos = compute_shape_position(index, m_plate_cols);
|
||||
m_plater->set_bed_position(pos);
|
||||
wxQueueEvent(m_plater, new SimpleEvent(EVT_GLCANVAS_PLATE_SELECT));
|
||||
//wxQueueEvent(m_plater, new SimpleEvent(EVT_GLCANVAS_PLATE_SELECT));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -7455,7 +7455,12 @@ int Plater::new_project(bool skip_confirm, bool silent)
|
|||
|
||||
Model m;
|
||||
model().load_from(m); // new id avoid same path name
|
||||
|
||||
//select first plate
|
||||
get_partplate_list().select_plate(0);
|
||||
SimpleEvent event(EVT_GLCANVAS_PLATE_SELECT);
|
||||
p->on_plate_selected(event);
|
||||
|
||||
p->load_auxiliary_files();
|
||||
wxGetApp().app_config->update_last_backup_dir(model().get_backup_path());
|
||||
|
||||
|
@ -10857,6 +10862,10 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click)
|
|||
{
|
||||
//select plate
|
||||
ret = p->partplate_list.select_plate(plate_index);
|
||||
if (!ret) {
|
||||
SimpleEvent event(EVT_GLCANVAS_PLATE_SELECT);
|
||||
p->on_plate_selected(event);
|
||||
}
|
||||
if ((!ret)&&(p->background_process.can_switch_print()))
|
||||
{
|
||||
//select successfully
|
||||
|
|
Loading…
Reference in a new issue