FIX: print model from sdcard with p1p

Change-Id: If85383ba762022ead3dd754ae02a08817b891114
Jira: none
This commit is contained in:
chunmao.guo
2023-11-08 10:48:17 +08:00
committed by Lane.Wei
parent f0454f849b
commit 5f1c4f7803

View File

@@ -272,10 +272,13 @@ std::pair<int, size_t> Slic3r::GUI::ImageGrid::HitTest(wxPoint const &pt)
auto & file = m_file_sys->GetFile(index);
int btn = file.IsDownload() && file.DownloadProgress() >= 0 ? 3 : 2;
if (m_file_sys->GetFileType() == PrinterFileSystem::F_MODEL) {
btn = 3;
if (m_show_download)
btn = 3;
hover_rect.y -= m_content_rect.GetHeight() * 64 / 264;
}
if (hover_rect.Contains(off.x, off.y)) { return {HIT_ACTION, index * 4 + off.x * btn / hover_rect.GetWidth()}; } // Two buttons
if (hover_rect.Contains(off.x, off.y)) {
return {HIT_ACTION, index * 4 + off.x * btn / hover_rect.GetWidth()};
} // Two buttons
}
return {HIT_ITEM, index};
}