mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-01 08:28:42 +03:00
fix bug of slic3r
This commit is contained in:
@@ -100,7 +100,7 @@ ObjectList::ObjectList(wxWindow* parent) :
|
||||
|
||||
// detect the current mouse position here, to pass it to list_manipulation() method
|
||||
// if we detect it later, the user may have moved the mouse pointer while calculations are performed, and this would mess-up the HitTest() call performed into list_manipulation()
|
||||
// see: https://github.com/qidi3d/QIDISlicer/issues/3802
|
||||
// see: https://github.com/QIDITECH/QIDISlicer/issues/3802
|
||||
#ifndef __WXOSX__
|
||||
const wxPoint mouse_pos = this->get_mouse_position_in_control();
|
||||
#endif
|
||||
@@ -109,7 +109,7 @@ ObjectList::ObjectList(wxWindow* parent) :
|
||||
// On Windows and Linux:
|
||||
// It's not invoked KillFocus event for "temporary" panels (like "Manipulation panel", "Settings", "Layer ranges"),
|
||||
// if we change selection in object list.
|
||||
// see https://github.com/qidi3d/QIDISlicer/issues/3303
|
||||
// see https://github.com/QIDITECH/QIDISlicer/issues/3303
|
||||
// But, if we call SetFocus() for ObjectList it will cause an invoking of a KillFocus event for "temporary" panels
|
||||
this->SetFocus();
|
||||
#else
|
||||
@@ -949,7 +949,6 @@ void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_me
|
||||
{
|
||||
// Interesting fact: when mouse_pos.x < 0, HitTest(mouse_pos, item, col) returns item = null, but column = last column.
|
||||
// So, when mouse was moved to scene immediately after clicking in ObjectList, in the scene will be shown context menu for the Editing column.
|
||||
// see: https://github.com/qidi3d/QIDISlicer/issues/3802
|
||||
if (mouse_pos.x < 0)
|
||||
return;
|
||||
|
||||
@@ -2489,7 +2488,7 @@ bool ObjectList::has_selected_cut_object() const
|
||||
|
||||
for (wxDataViewItem item : sels) {
|
||||
const int obj_idx = m_objects_model->GetObjectIdByItem(item);
|
||||
// ys_FIXME: The obj_idx<size condition is a workaround for https://github.com/prusa3d/PrusaSlicer/issues/11186,
|
||||
// ys_FIXME: The obj_idx<size condition is a workaround for https://github.com/QIDITECH/QIDISlicer/issues/11186,
|
||||
// but not the correct fix. The deleted item probably should not be in sels in the first place.
|
||||
if (obj_idx >= 0 && obj_idx < int(m_objects->size()) && object(obj_idx)->is_cut())
|
||||
return true;
|
||||
@@ -3663,7 +3662,6 @@ void ObjectList::update_selections()
|
||||
sels.Add(m_objects_model->GetItemByInstanceId(selection.get_object_idx(), selection.get_instance_idx()));
|
||||
// Can be the case, when we have selected itSettings | itLayerRoot | itLayer in the ObjectList and selected object/instance in the Scene
|
||||
// and then select some object/instance in 3DScene using Ctrt+left click
|
||||
// see https://github.com/qidi3d/QIDISlicer/issues/5517
|
||||
else {
|
||||
// Unselect all items in ObjectList
|
||||
m_last_selected_item = wxDataViewItem(nullptr);
|
||||
|
||||
Reference in New Issue
Block a user