mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-13 06:46:11 -06:00
FIX:Display the interface then create big_bed_image_popup
jira: none Change-Id: I020b72b71283a6873dcc2b4cd6fcf9ae98c6d0a4 (cherry picked from commit 4d934184e3bca25fccdba498800d2720d0eba67d)
This commit is contained in:
parent
fab93abdca
commit
81d62df2c7
1 changed files with 10 additions and 2 deletions
|
|
@ -1520,7 +1520,6 @@ Sidebar::Sidebar(Plater *parent)
|
|||
wiki_bed->Bind(wxEVT_BUTTON, [](wxCommandEvent) {
|
||||
wxLaunchDefaultBrowser("https://wiki.bambulab.com/en/x1/manual/compatibility-and-parameter-settings-of-filaments");
|
||||
});
|
||||
p->big_bed_image_popup = new ImageDPIFrame();
|
||||
|
||||
ScalableBitmap bitmap_bed(p->panel_printer_bed, "printer_placeholder", 32);
|
||||
p->image_printer_bed = new wxStaticBitmap(p->panel_printer_bed, wxID_ANY, bitmap_bed.bmp(), wxDefaultPosition, wxDefaultSize, 0);
|
||||
|
|
@ -1537,7 +1536,10 @@ Sidebar::Sidebar(Plater *parent)
|
|||
auto select_bed_type = get_cur_select_bed_type();
|
||||
bool isDual = static_cast<wxBoxSizer *>(p->panel_printer_preset->GetSizer())->GetOrientation() == wxVERTICAL;
|
||||
p->image_printer_bed->SetBitmap(create_scaled_bitmap(bed_type_thumbnails[select_bed_type], this, isDual ? 48 : 32));
|
||||
p->big_bed_image_popup->set_bitmap(create_scaled_bitmap("big_" + bed_type_thumbnails[select_bed_type], p->big_bed_image_popup, p->big_bed_image_popup->get_image_px()));
|
||||
if (p->big_bed_image_popup) {
|
||||
p->big_bed_image_popup->set_bitmap(
|
||||
create_scaled_bitmap("big_" + bed_type_thumbnails[select_bed_type], p->big_bed_image_popup, p->big_bed_image_popup->get_image_px()));
|
||||
}
|
||||
e.Skip(); // fix bug:Event spreads to sidebar
|
||||
});
|
||||
|
||||
|
|
@ -1545,6 +1547,12 @@ Sidebar::Sidebar(Plater *parent)
|
|||
auto pos = p->image_printer_bed->GetScreenPosition();
|
||||
auto rect = p->image_printer_bed->GetRect();
|
||||
wxPoint temp_pos(pos.x + rect.GetWidth(), pos.y);
|
||||
if (p->big_bed_image_popup == nullptr) {
|
||||
p->big_bed_image_popup = new ImageDPIFrame();
|
||||
auto select_bed_type = get_cur_select_bed_type();
|
||||
p->big_bed_image_popup->set_bitmap(
|
||||
create_scaled_bitmap("big_" + bed_type_thumbnails[select_bed_type], p->big_bed_image_popup, p->big_bed_image_popup->get_image_px()));
|
||||
}
|
||||
p->big_bed_image_popup->SetCanFocus(false);
|
||||
p->big_bed_image_popup->SetPosition(temp_pos);
|
||||
p->big_bed_image_popup->on_show();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue