mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
Warnings: various fixes (#6582)
* Warnings: various fixes * Use std::ignore
This commit is contained in:
parent
1afc1372bc
commit
044a1c4fc5
7 changed files with 17 additions and 14 deletions
|
@ -2134,7 +2134,7 @@ bool ImGui::BBLBeginCombo(const char *label, const char *preview_value, ImGuiCom
|
||||||
bool hovered, held;
|
bool hovered, held;
|
||||||
bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held);
|
bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held);
|
||||||
|
|
||||||
bool push_color_count = 0;
|
int push_color_count = 0;
|
||||||
if (hovered || g.ActiveId == id) {
|
if (hovered || g.ActiveId == id) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Border, GetColorU32(ImGuiCol_BorderActive));
|
ImGui::PushStyleColor(ImGuiCol_Border, GetColorU32(ImGuiCol_BorderActive));
|
||||||
push_color_count = 1;
|
push_color_count = 1;
|
||||||
|
@ -4170,7 +4170,7 @@ bool ImGui::BBLInputScalar(const char *label, ImGuiDataType data_type, void *p_d
|
||||||
// We are only allowed to access the state if we are already the active widget.
|
// We are only allowed to access the state if we are already the active widget.
|
||||||
ImGuiInputTextState *state = GetInputTextState(id);
|
ImGuiInputTextState *state = GetInputTextState(id);
|
||||||
|
|
||||||
bool push_color_count = 0;
|
int push_color_count = 0;
|
||||||
if (hovered || g.ActiveId == id) {
|
if (hovered || g.ActiveId == id) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Border, GetColorU32(ImGuiCol_BorderActive));
|
ImGui::PushStyleColor(ImGuiCol_Border, GetColorU32(ImGuiCol_BorderActive));
|
||||||
push_color_count = 1;
|
push_color_count = 1;
|
||||||
|
|
|
@ -3057,7 +3057,7 @@ bool GLGizmoEmboss::choose_font_by_wxdialog()
|
||||||
}
|
}
|
||||||
#endif // ALLOW_ADD_FONT_BY_OS_SELECTOR
|
#endif // ALLOW_ADD_FONT_BY_OS_SELECTOR
|
||||||
|
|
||||||
#if defined ALLOW_ADD_FONT_BY_FILE or defined ALLOW_DEBUG_MODE
|
#if defined ALLOW_ADD_FONT_BY_FILE || defined ALLOW_DEBUG_MODE
|
||||||
namespace priv {
|
namespace priv {
|
||||||
static std::string get_file_name(const std::string &file_path)
|
static std::string get_file_name(const std::string &file_path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -446,7 +446,7 @@ void PrintJob::process(Ctl &ctl)
|
||||||
std::string curr_job_id;
|
std::string curr_job_id;
|
||||||
json job_info_j;
|
json job_info_j;
|
||||||
try {
|
try {
|
||||||
job_info_j.parse(job_info);
|
std::ignore = job_info_j.parse(job_info);
|
||||||
if (job_info_j.contains("job_id")) {
|
if (job_info_j.contains("job_id")) {
|
||||||
curr_job_id = job_info_j["job_id"].get<std::string>();
|
curr_job_id = job_info_j["job_id"].get<std::string>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,8 @@ const int HEADER_BORDER = 5;
|
||||||
const int CONTENT_BORDER = 3;
|
const int CONTENT_BORDER = 3;
|
||||||
const int PANEL_WIDTH = 370;
|
const int PANEL_WIDTH = 370;
|
||||||
const int COLOR_LABEL_WIDTH = 180;
|
const int COLOR_LABEL_WIDTH = 180;
|
||||||
|
|
||||||
|
#undef ICON_SIZE
|
||||||
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
||||||
#define MIN_OBJCOLOR_DIALOG_WIDTH FromDIP(400)
|
#define MIN_OBJCOLOR_DIALOG_WIDTH FromDIP(400)
|
||||||
#define FIX_SCROLL_HEIGTH FromDIP(400)
|
#define FIX_SCROLL_HEIGTH FromDIP(400)
|
||||||
|
|
|
@ -1789,7 +1789,7 @@ void Sidebar::sync_ams_list()
|
||||||
|
|
||||||
// BBS:Record consumables information before synchronization
|
// BBS:Record consumables information before synchronization
|
||||||
std::vector<string> color_before_sync;
|
std::vector<string> color_before_sync;
|
||||||
std::vector<int> is_support_before;
|
std::vector<bool> is_support_before;
|
||||||
DynamicPrintConfig& project_config = wxGetApp().preset_bundle->project_config;
|
DynamicPrintConfig& project_config = wxGetApp().preset_bundle->project_config;
|
||||||
ConfigOptionStrings* color_opt = project_config.option<ConfigOptionStrings>("filament_colour");
|
ConfigOptionStrings* color_opt = project_config.option<ConfigOptionStrings>("filament_colour");
|
||||||
for (int i = 0; i < p->combos_filament.size(); ++i) {
|
for (int i = 0; i < p->combos_filament.size(); ++i) {
|
||||||
|
|
|
@ -1139,8 +1139,8 @@ int GuideFrame::LoadProfile()
|
||||||
//cout << iter->path().string() << endl;
|
//cout << iter->path().string() << endl;
|
||||||
|
|
||||||
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
||||||
strVendor = strVendor.AfterLast( '\\');
|
strVendor = strVendor.AfterLast('\\');
|
||||||
strVendor = strVendor.AfterLast('\/');
|
strVendor = strVendor.AfterLast('/');
|
||||||
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
||||||
|
|
||||||
if (w2s(strVendor) == PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json") == 0)
|
if (w2s(strVendor) == PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json") == 0)
|
||||||
|
@ -1158,8 +1158,8 @@ int GuideFrame::LoadProfile()
|
||||||
//cout << "is a file" << endl;
|
//cout << "is a file" << endl;
|
||||||
//cout << iter->path().string() << endl;
|
//cout << iter->path().string() << endl;
|
||||||
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
||||||
strVendor = strVendor.AfterLast( '\\');
|
strVendor = strVendor.AfterLast('\\');
|
||||||
strVendor = strVendor.AfterLast('\/');
|
strVendor = strVendor.AfterLast('/');
|
||||||
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
||||||
|
|
||||||
if (w2s(strVendor) != PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json")==0)
|
if (w2s(strVendor) != PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json")==0)
|
||||||
|
@ -1656,7 +1656,7 @@ std::string GuideFrame::w2s(wxString sSrc)
|
||||||
|
|
||||||
void GuideFrame::GetStardardFilePath(std::string &FilePath) {
|
void GuideFrame::GetStardardFilePath(std::string &FilePath) {
|
||||||
StrReplace(FilePath, "\\", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
StrReplace(FilePath, "\\", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||||
StrReplace(FilePath, "\/", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
StrReplace(FilePath, "/" , w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GuideFrame::LoadFile(std::string jPath, std::string &sContent)
|
bool GuideFrame::LoadFile(std::string jPath, std::string &sContent)
|
||||||
|
|
|
@ -20,6 +20,7 @@ int scale(const int val) { return val * Slic3r::GUI::wxGetApp().em_unit() / 10;
|
||||||
int ITEM_WIDTH() { return scale(30); }
|
int ITEM_WIDTH() { return scale(30); }
|
||||||
static const wxColour g_text_color = wxColour(107, 107, 107, 255);
|
static const wxColour g_text_color = wxColour(107, 107, 107, 255);
|
||||||
|
|
||||||
|
#undef ICON_SIZE
|
||||||
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
||||||
#define TABLE_BORDER FromDIP(28)
|
#define TABLE_BORDER FromDIP(28)
|
||||||
#define HEADER_VERT_PADDING FromDIP(12)
|
#define HEADER_VERT_PADDING FromDIP(12)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue