diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-02-07 13:55:32 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-02-07 13:58:09 +0100 |
commit | 4af737df9fb1746a34d461770b5ec8b09664aea1 (patch) | |
tree | 0f8243b427338eb98acf68343bb969fd26242fef /sfx2/source | |
parent | 014c5761e2132ba65138f86f0fe0b42d4b858c26 (diff) |
templatemanager: Fix empty dialog when saving templates.
We used to call just mpTabControl->Clear() in setSaveMode(); but that worked
only with .src dialogs, as the tab pages could have existed even without
TabControl containing them. This is not possible with .ui definitions any
more (and rightly so!), so show just one tab here for now, until we do a
bigger Template manager rework.
Change-Id: I400dbcc326e883a1c1f526e94974162c3641f8ae
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 1464b1480e39..16b023f40254 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -320,7 +320,14 @@ void SfxTemplateManagerDlg::setSaveMode() { mbIsSaveMode = true; - mpTabControl->Clear(); + // FIXME We used to call just mpTabControl->Clear() here; but that worked + // only with .src dialogs, as the tab pages could have existed even + // without TabControl containing them. This is not possible with .ui + // definitions any more (and rightly so!), so leave just one tab here for + // now, until we do a bigger Template manager rework. + while (mpTabControl->GetPageCount() > 1) + mpTabControl->RemovePage(mpTabControl->GetPageId(1)); + mpCurView->filterItems(ViewFilter_Application(FILTER_APP_NONE)); mpViewBar->ShowItem(VIEWBAR_SAVE); |