Commit 445689ec authored by Falk Brettschneider's avatar Falk Brettschneider

bugfix: last fix concerning a grave GUI bug, was application crash in Toplevel mode

(clicked Compile when no view of two was activated)
--> Waldo, can you do me a favour again, and move the tag, please?! (
The fix is important for the Toplevel mode.)
Cheers, F@lk
parent 776f747f
2001-08-05 F@lk Brettschneider <falk@kdevelop.org>
* bugfix: last fix concerning a grave GUI bug, was application crash in Toplevel mode
(clicked Compile when no view of two was activated)
2001-08-04 jbb <jbb@kdevelop.org>
* Bring admin dir upto kde-2.2_release
* workaround: bug#30097 frank assured me that KDEHOME was not set, but .kde2 was
being used. This change just prefers .kde2 over .kde iff KDEHOME is not set.
It shouldn't hurt and I gave kdevelop-devel a day to complain ...
2001-07-31 Harald Fernengel <harry@bnro.de>
* cut/paste for non-source files
* made it compile with gcc-3.0, too
......
......@@ -799,7 +799,7 @@ bool DocViewMan::closeView(QWidget* pWnd)
if (pChild->isWidgetType()) {
pView = (QWidget*) pChild;
if (CEditWidget* pEditView = dynamic_cast<CEditWidget*> (pView)) {
if (checkAndSaveFileOfCurrentEditView(true) != KMessageBox::Cancel) {
if (checkAndSaveFileOfCurrentEditView(true, pEditView) != KMessageBox::Cancel) {
closeEditView(pEditView);
return true;
}
......@@ -847,10 +847,10 @@ void DocViewMan::closeEditView(CEditWidget* pView)
/* if there are no more views, the pointer have to be "reset" here,
* because slot_viewActivated() can not be called any longer
*/
if (m_MDICoverList.count() == 0) {
// if (m_MDICoverList.count() == 0) {
m_pCurEditView = 0L;
m_pCurBrowserView = 0L;
}
// }
}
//-----------------------------------------------------------------------------
......@@ -1206,11 +1206,19 @@ void DocViewMan::doCloseAllDocs()
}
}
int DocViewMan::checkAndSaveFileOfCurrentEditView(bool bDoModifiedInsideCheck)
int DocViewMan::checkAndSaveFileOfCurrentEditView(bool bDoModifiedInsideCheck, CEditWidget* pCurEditView)
{
// Get the current file name
QString filename = currentEditView()->getName();
KWriteDoc* pCurEditDoc = currentEditDoc();
KWriteDoc* pCurEditDoc = 0L;
QString filename;
if (!pCurEditView) {
pCurEditView = currentEditView();
pCurEditDoc = currentEditDoc();
}
else {
pCurEditDoc = pCurEditView->doc();
}
filename = pCurEditView->getName();
if (pCurEditDoc == 0)
return KMessageBox::Cancel; //oops :-(
......@@ -1255,7 +1263,7 @@ int DocViewMan::checkAndSaveFileOfCurrentEditView(bool bDoModifiedInsideCheck)
}
// Really save it
currentEditView()->doSave();
pCurEditView->doSave();
QFileInfo file_info2(filename);
pCurEditDoc->setLastFileModifDate(file_info2.lastModified());
......
......@@ -88,7 +88,7 @@ public:
void reloadModifiedFiles();
/** */
int checkAndSaveFileOfCurrentEditView(bool bDoModifiedInsideCheck = true);
int checkAndSaveFileOfCurrentEditView(bool bDoModifiedInsideCheck = true, CEditWidget* pCurEditView = 0L);
/** */
bool doFileClose();
......
......@@ -403,7 +403,7 @@ void QextMdiChildView::activate()
if(!m_bFocusInEventIsPending) {
setFocus();
}
qDebug("QextMdiChildView::activate() called!");
//qDebug("QextMdiChildView::activate() called!");
emit activated(this);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment