[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 6 14:24:56 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit db9a737c6bec181a259d6bdba2a70b8342b7bdd6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 5 20:37:03 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 6 16:24:17 2020 +0200
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 at redhat.com>
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);
More information about the Libreoffice-commits
mailing list