diff --git a/apps/opencs/view/doc/view.cpp b/apps/opencs/view/doc/view.cpp index 5636fff94..e10f85c64 100644 --- a/apps/opencs/view/doc/view.cpp +++ b/apps/opencs/view/doc/view.cpp @@ -811,7 +811,10 @@ void CSVDoc::View::closeRequest (SubView *subView) if (mSubViews.size()>1 || mViewTotal<=1 || userSettings.setting ("window/hide-subview", QString ("false"))!="true") + { subView->deleteLater(); + mSubViews.removeOne (subView); + } else if (mViewManager.closeRequest (this)) mViewManager.removeDocAndView (mDocument); }