From 1b45d4217fecaf98445d6c1e641f2b3996a2d605 Mon Sep 17 00:00:00 2001 From: nils Date: Tue, 4 Jan 2011 15:33:00 +0000 Subject: again little bugfix for closing last tab git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@433 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- textedit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'textedit.cpp') diff --git a/textedit.cpp b/textedit.cpp index 76b641b..36a895b 100644 --- a/textedit.cpp +++ b/textedit.cpp @@ -195,7 +195,10 @@ bool TextEdit::closeFile() void TextEdit::closeTab() { removeTab(tabWidget->currentIndex()); - curPage()->getTextPage()->setFocus(); + if (tabWidget->count() != 0) + { + curPage()->getTextPage()->setFocus(); + } } void TextEdit::removeTab(int index) -- cgit v1.2.3