From 08576ad7462f4724267fae4fcf5062e83b8b8586 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 7 Aug 2020 10:21:20 +0200 Subject: [PATCH] UnsavedChangesDialog :: Toggle column is on first place now --- src/slic3r/GUI/ExtraRenderers.cpp | 6 +++--- src/slic3r/GUI/UnsavedChangesDialog.cpp | 4 +--- src/slic3r/GUI/UnsavedChangesDialog.hpp | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/ExtraRenderers.cpp b/src/slic3r/GUI/ExtraRenderers.cpp index e4c09dc26..2915d498c 100644 --- a/src/slic3r/GUI/ExtraRenderers.cpp +++ b/src/slic3r/GUI/ExtraRenderers.cpp @@ -159,14 +159,14 @@ wxSize BitmapTextRenderer::GetSize() const dc.SetFont(GetAttr().GetEffectiveFont(view->GetFont())); size = m_markupText->Measure(dc); + + int lines = m_value.GetText().Freq('\n') + 1; + size.SetHeight(size.GetHeight() * lines); } else #endif // SUPPORTS_MARKUP && wxHAS_GENERIC_DATAVIEWCTRL size = GetTextExtent(m_value.GetText()); - int lines = m_value.GetText().Freq('\n') + 1; - size.SetHeight(size.GetHeight() * lines); - if (m_value.GetBitmap().IsOk()) size.x += m_value.GetBitmap().GetWidth() + 4; return size; diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp index 1bdc2959b..ab2c36ebd 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.cpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp @@ -440,10 +440,8 @@ UnsavedChangesDialog::UnsavedChangesDialog(Preset::Type type) m_tree->AssociateModel(m_tree_model); m_tree_model->SetAssociatedControl(m_tree); - m_tree->AppendColumn(new wxDataViewColumn("", new BitmapTextRenderer(true), UnsavedChangesModel::colIconText, 30 * em, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE)); - m_tree->AppendToggleColumn(L"\u2714", UnsavedChangesModel::colToggle, wxDATAVIEW_CELL_ACTIVATABLE, 6 * em);//2610,11,12 //2714 - + m_tree->AppendColumn(new wxDataViewColumn("", new BitmapTextRenderer(true), UnsavedChangesModel::colIconText, 30 * em, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE)); m_tree->AppendColumn(new wxDataViewColumn("Old value", new BitmapTextRenderer(true), UnsavedChangesModel::colOldValue, 20 * em, wxALIGN_TOP)); m_tree->AppendColumn(new wxDataViewColumn("New value", new BitmapTextRenderer(true), UnsavedChangesModel::colNewValue, 20 * em, wxALIGN_TOP)); diff --git a/src/slic3r/GUI/UnsavedChangesDialog.hpp b/src/slic3r/GUI/UnsavedChangesDialog.hpp index 3d5867ea4..c4a02d7bc 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.hpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.hpp @@ -134,8 +134,8 @@ class UnsavedChangesModel : public wxDataViewModel public: enum { - colIconText, colToggle, + colIconText, colOldValue, colNewValue, colMax