Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2022-02-02 14:42:51 +0300
committerYuSanka <yusanka@gmail.com>2022-02-02 14:44:36 +0300
commit6667852d928fbb64d1660c0b3eb464cf0ab093d8 (patch)
tree2a6accd1bfd6c0bfadb476b8facd0fe0f1c87c50
parentfc59a2c1b050af8cd2b257448b9d4b4931ff77c0 (diff)
DiffPresetsDialog: Added info line for truncated option values.
Related to #7852 - Compare Filament Dialog: Values are truncated
-rw-r--r--src/slic3r/GUI/UnsavedChangesDialog.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp
index 002287ded..ef1a025af 100644
--- a/src/slic3r/GUI/UnsavedChangesDialog.cpp
+++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp
@@ -656,6 +656,7 @@ void DiffViewCtrl::Clear()
{
model->Clear();
m_items_map.clear();
+ m_has_long_strings = false;
}
wxString DiffViewCtrl::get_short_string(wxString full_string)
@@ -1523,8 +1524,8 @@ DiffPresetDialog::DiffPresetDialog(MainFrame* mainframe)
topSizer->Add(m_top_info_line, 0, wxEXPAND | wxLEFT | wxTOP | wxRIGHT, 2 * border);
topSizer->Add(presets_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxRIGHT, border);
topSizer->Add(m_show_all_presets, 0, wxEXPAND | wxALL, border);
- topSizer->Add(m_bottom_info_line, 0, wxEXPAND | wxALL, 2 * border);
topSizer->Add(m_tree, 1, wxEXPAND | wxALL, border);
+ topSizer->Add(m_bottom_info_line, 0, wxEXPAND | wxALL, 2 * border);
this->SetMinSize(wxSize(80 * em, 30 * em));
this->SetSizer(topSizer);
@@ -1689,12 +1690,17 @@ void DiffPresetDialog::update_tree()
left_val, right_val, category_icon_map.at(option.category));
}
}
+
+ if (m_tree->has_long_strings())
+ bottom_info = _L("Some fields are too long to fit. Right mouse click reveals the full text.");
bool tree_was_shown = m_tree->IsShown();
m_tree->Show(show_tree);
- if (!show_tree)
+
+ bool show_bottom_info = !show_tree || m_tree->has_long_strings();
+ if (show_bottom_info)
m_bottom_info_line->SetLabel(bottom_info);
- m_bottom_info_line->Show(!show_tree);
+ m_bottom_info_line->Show(show_bottom_info);
if (tree_was_shown == m_tree->IsShown())
Layout();