From e26c2d8a535f163348c4e50ccffd4125082df393 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Mon, 6 May 2013 22:05:31 -0700 Subject: Fix so that we can open a new document after already opening one --- winrt/mupdf_cpp/MainPage.xaml.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'winrt') diff --git a/winrt/mupdf_cpp/MainPage.xaml.cpp b/winrt/mupdf_cpp/MainPage.xaml.cpp index a8b1d930..5cb2298f 100644 --- a/winrt/mupdf_cpp/MainPage.xaml.cpp +++ b/winrt/mupdf_cpp/MainPage.xaml.cpp @@ -378,11 +378,8 @@ void mupdf_cpp::MainPage::SetFlipView() void mupdf_cpp::MainPage::CleanUp() { /* Remove current pages in the flipviews */ - if (xaml_vert_flipView->Items->Size) - xaml_vert_flipView->Items->Clear(); - - if (xaml_horiz_flipView->Items->Size) - xaml_horiz_flipView->Items->Clear(); + if (m_docPages != nullptr && m_docPages->Size > 0) + m_docPages->Clear(); this->m_curr_flipView = nullptr; m_currpage = -1; -- cgit v1.2.3