diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-05 20:37:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-06 16:24:17 +0200 |
commit | db9a737c6bec181a259d6bdba2a70b8342b7bdd6 (patch) | |
tree | ea1ffdb2d8d14f1d58943bad42042184ce5423d1 /vcl/unx | |
parent | b2c6746e19ee186f89870e33af9705fa2c31933b (diff) |
adjust internal/external index for signal_toggled
g-lo-CellIndex is the internal view, adjust that for
signal_toggled
Change-Id: I9ad0cf2e63c2bb03463650a84a9145cf3760ae4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95621
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 4a9d950ab533..12214117ffa8 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -9439,7 +9439,7 @@ private: set(iter, m_aToggleTriStateMap[nCol], false); - signal_toggled(iter_col(GtkInstanceTreeIter(iter), nCol)); + signal_toggled(iter_col(GtkInstanceTreeIter(iter), to_external_model(nCol))); gtk_tree_path_free(tree_path); } @@ -9551,6 +9551,8 @@ private: void set_column_editable(int nCol, bool bEditable) { + nCol = to_internal_model(nCol); + for (GList* pEntry = g_list_first(m_pColumns); pEntry; pEntry = g_list_next(pEntry)) { GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(pEntry->data); @@ -9840,8 +9842,7 @@ public: else if (m_nImageCol == -1) m_nImageCol = nIndex; } - int nExternalIndex = to_external_model(nIndex); - g_object_set_data(G_OBJECT(pCellRenderer), "g-lo-CellIndex", reinterpret_cast<gpointer>(nExternalIndex)); + g_object_set_data(G_OBJECT(pCellRenderer), "g-lo-CellIndex", reinterpret_cast<gpointer>(nIndex)); ++nIndex; } g_list_free(pRenderers); |