Merge branch 'master' of https://github.com/prusa3d/Slic3r
This commit is contained in:
commit
de23725a1e
4 changed files with 15 additions and 2 deletions
|
@ -5298,7 +5298,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
if (m_hover_volume_id != -1)
|
||||
{
|
||||
// if right clicking on volume, propagate event through callback (shows context menu)
|
||||
if (m_volumes.volumes[m_hover_volume_id]->hover && !m_volumes.volumes[m_hover_volume_id]->is_wipe_tower)
|
||||
if (m_volumes.volumes[m_hover_volume_id]->hover
|
||||
&& !m_volumes.volumes[m_hover_volume_id]->is_wipe_tower // no context menu for the wipe tower
|
||||
&& m_gizmos.get_current_type() != Gizmos::SlaSupports) // disable context menu when the gizmo is open
|
||||
{
|
||||
// forces the selection of the volume
|
||||
if (!m_selection.is_multiple_full_instance())
|
||||
|
|
|
@ -2267,7 +2267,8 @@ void GLGizmoSlaSupports::on_render_input_window(float x, float y, float bottom_l
|
|||
RENDER_AGAIN:
|
||||
m_imgui->set_next_window_pos(x, y, ImGuiCond_Always);
|
||||
|
||||
static const ImVec2 window_size(285.f, 260.f);
|
||||
const float scaling = m_imgui->get_style_scaling();
|
||||
const ImVec2 window_size(285.f * scaling, 260.f * scaling);
|
||||
ImGui::SetNextWindowPos(ImVec2(x, y - std::max(0.f, y+window_size.y-bottom_limit) ));
|
||||
ImGui::SetNextWindowSize(ImVec2(window_size));
|
||||
|
||||
|
|
|
@ -2147,7 +2147,15 @@ void ObjectList::update_settings_items()
|
|||
for (auto& item : items) {
|
||||
const wxDataViewItem& settings_item = m_objects_model->GetSettingsItem(item);
|
||||
select_item(settings_item ? settings_item : m_objects_model->AddSettingsChild(item));
|
||||
|
||||
// If settings item was deleted from the list,
|
||||
// it's need to be deleted from selection array, if it was there
|
||||
if (settings_item != m_objects_model->GetSettingsItem(item) &&
|
||||
sel.Index(settings_item) != wxNOT_FOUND) {
|
||||
sel.Remove(settings_item);
|
||||
}
|
||||
}
|
||||
|
||||
// restore selection:
|
||||
SetSelections(sel);
|
||||
m_prevent_canvas_selection_update = false;
|
||||
|
|
|
@ -42,6 +42,8 @@ public:
|
|||
bool update_mouse_data(wxMouseEvent &evt);
|
||||
bool update_key_data(wxKeyEvent &evt);
|
||||
|
||||
float get_style_scaling() const { return m_style_scaling; }
|
||||
|
||||
void new_frame();
|
||||
void render();
|
||||
|
||||
|
|
Loading…
Reference in a new issue