vcl/unx/gtk3/gtkinst.cxx |   23 -----------------------
 1 file changed, 23 deletions(-)

New commits:
commit 628efead20066f5ec4e3d2bf2bcc9e9513c6d04b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Nov 7 09:18:44 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Nov 7 12:37:01 2022 +0100

    Revert recalcuting m_nTextCol when setting a cell editable
    
    Revert: "vcl: allow editing a column other than the first one in 
GtkInstanceTreeView"
    
    This reverts commit be11a3573a21e83dfb6a473d98bc8ba9bf57057c.
    
    both basctl watchwindow and writer insert bookmark work as expected
    without this.
    
    .git/COMMIT_EDITMSG.save
    
    Revert "vcl: allow editing a column other than the first one in 
GtkInstanceTreeView"
    
    This reverts commit be11a3573a21e83dfb6a473d98bc8ba9bf57057c.
    
    Change-Id: I3384164ef5634b6695cc7edad7c03a3242195003
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142366
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 3ba69b9fdb53..82bd0e724483 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -14374,12 +14374,6 @@ private:
     {
         nCol = to_internal_model(nCol);
 
-        // recompute these 2 based on new 1st editable column
-        m_nTextCol = -1;
-        m_nTextView = -1;
-        int nIndex(0);
-        int nViewColumn(0);
-        bool isSet(false);
         for (GList* pEntry = g_list_first(m_pColumns); pEntry; pEntry = 
g_list_next(pEntry))
         {
             GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(pEntry->data);
@@ -14391,27 +14385,10 @@ private:
                 if (reinterpret_cast<sal_IntPtr>(pData) == nCol)
                 {
                     g_object_set(G_OBJECT(pCellRenderer), "editable", 
bEditable, "editable-set", true, nullptr);
-                    isSet = true;
-                }
-                if (GTK_IS_CELL_RENDERER_TEXT(pCellRenderer))
-                {
-                    gboolean is_editable(false);
-                    g_object_get(pCellRenderer, "editable", &is_editable, 
nullptr);
-                    if (is_editable && m_nTextCol == -1)
-                    {
-                        assert(m_nTextView == -1);
-                        m_nTextCol = nIndex;
-                        m_nTextView = nViewColumn;
-                    }
-                }
-                if (isSet && m_nTextCol != -1) // both tasks done?
-                {
                     break;
                 }
-                ++nIndex;
             }
             g_list_free(pRenderers);
-            ++nViewColumn;
         }
     }
 

Reply via email to