summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-12-12 13:43:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-12-13 21:21:54 +0100
commit10cf4d5193df2f804176c05a843e801077dbf2ce (patch)
tree3f29849bd1e028eabb046a752cb827ddf6ef8a6d
parent22f4dd588c6861da9156a8c27f0bb76f42d5a784 (diff)
tdf#138851: Named range manager always display "Document (Global)" at launching
In Init() method, call SelectionChanged() at the end so we're sure everything is up-to-date. Change-Id: I1bd8c44e172cd9f739650a6f76478214c0a31ac0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107638 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 566ecd8fc102..88a115aec4b5 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -108,13 +108,6 @@ void ScNameDlg::Init()
xTreeView->get_height_rows(10));
m_xRangeManagerTable.reset(new ScRangeManagerTable(std::move(xTreeView), m_RangeMap, maCursorPos));
- if (m_xRangeManagerTable->n_children())
- {
- m_xRangeManagerTable->set_cursor(0);
- m_xRangeManagerTable->CheckForFormulaString();
- SelectionChanged();
- }
-
m_xRangeManagerTable->connect_changed( LINK( this, ScNameDlg, SelectionChangedHdl_Impl ) );
m_xBtnOk->connect_clicked( LINK( this, ScNameDlg, OkBtnHdl ) );
@@ -142,6 +135,14 @@ void ScNameDlg::Init()
}
CheckForEmptyTable();
+
+ if (m_xRangeManagerTable->n_children())
+ {
+ m_xRangeManagerTable->set_cursor(0);
+ m_xRangeManagerTable->CheckForFormulaString();
+ SelectionChanged();
+ }
+
}
bool ScNameDlg::IsRefInputMode() const