| Summary: | CTRL-W keeps closing empty document and creating new one | ||
|---|---|---|---|
| Product: | [Unmaintained] quanta | Reporter: | whoeiee:eani <eani> |
| Component: | general | Assignee: | András Manţia <amantia> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.4.2 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
whoeiee:eani
2005-08-27 13:04:20 UTC
SVN commit 515385 by amantia:
Don't try to remove an empty, unmodified buffer, if it is the last opened one.
BUG: 111599
M +2 -0 ChangeLog
M +11 -0 src/viewmanager.cpp
--- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #515384:515385
@@ -12,6 +12,8 @@
- improvements:
- less reparsing of the document while typing is in progress
- open dropped files [#102605]
+ - don't try to remove an empty, unmodified buffer, if it is the last
+ opened one [#111599]
Version 3.5.1 (Release date: 23-01-2006; Started 30-11-2005):
--- branches/KDE/3.5/kdewebdev/quanta/src/viewmanager.cpp #515384:515385
@@ -153,6 +153,17 @@
bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
{
if (!view) return false;
+ int noOfViews = 0;
+ QValueList<Document*> list;
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ for (it->first(); !it->isDone(); it->next())
+ {
+ noOfViews++;
+ if (noOfViews > 1)
+ break;
+ }
+ if (noOfViews == 1 && view->document()->isUntitled() && !view->document()->isModified())
+ return true;
bool mayRemove = view->mayRemove();
if (mayRemove)
{
|