mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-08 11:39:01 +08:00
FIX:updata_thumbnail_data is valid only in preview tab
jira: none Change-Id: I70d6cc71154d0b1e3cc3a83d13b578731eae05a4 (cherry picked from commit aee85d72352c1073f69a756984170af62712e7ce)
This commit is contained in:
parent
652986bbf1
commit
82b131857f
@ -21,6 +21,7 @@
|
|||||||
#include <miniz.h>
|
#include <miniz.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
|
#include "Notebook.hpp"
|
||||||
#include "BitmapCache.hpp"
|
#include "BitmapCache.hpp"
|
||||||
#include "BindDialog.hpp"
|
#include "BindDialog.hpp"
|
||||||
|
|
||||||
@ -1821,7 +1822,9 @@ void SelectMachineDialog::sync_ams_mapping_result(std::vector<FilamentInfo> &res
|
|||||||
iter++;
|
iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updata_thumbnail_data_after_connected_printer();
|
if ((MainFrame::TabPosition) dynamic_cast<Notebook *>(wxGetApp().tab_panel())->GetSelection() == MainFrame::TabPosition::tpPreview) {
|
||||||
|
updata_thumbnail_data_after_connected_printer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_ams_mapping_result(std::vector<FilamentInfo>& result)
|
void print_ams_mapping_result(std::vector<FilamentInfo>& result)
|
||||||
@ -4153,7 +4156,7 @@ wxColour SelectMachineDialog::adjust_color_for_render(const wxColour &color)
|
|||||||
|
|
||||||
void SelectMachineDialog::final_deal_edge_pixels_data(ThumbnailData &data)
|
void SelectMachineDialog::final_deal_edge_pixels_data(ThumbnailData &data)
|
||||||
{
|
{
|
||||||
if (data.width > 0 && data.height > 0) {
|
if (data.width > 0 && data.height > 0 && m_edge_pixels.size() >0 ) {
|
||||||
for (unsigned int r = 0; r < data.height; ++r) {
|
for (unsigned int r = 0; r < data.height; ++r) {
|
||||||
unsigned int rr = (data.height - 1 - r) * data.width;
|
unsigned int rr = (data.height - 1 - r) * data.width;
|
||||||
bool exist_rr_up = r >= 1 ? true : false;
|
bool exist_rr_up = r >= 1 ? true : false;
|
||||||
@ -4385,7 +4388,7 @@ void SelectMachineDialog::set_default_from_sdcard()
|
|||||||
image = image.Rescale(FromDIP(256), FromDIP(256));
|
image = image.Rescale(FromDIP(256), FromDIP(256));
|
||||||
m_thumbnailPanel->set_thumbnail(image);
|
m_thumbnailPanel->set_thumbnail(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
//for black list
|
//for black list
|
||||||
std::vector<std::string> materials;
|
std::vector<std::string> materials;
|
||||||
std::vector<std::string> brands;
|
std::vector<std::string> brands;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user