[Uml-devel] kdesdk/umbrello/umbrello
Jonathan Riddell
jri at jriddell.org
Sat Mar 27 13:26:01 UTC 2004
CVS commit by jriddell:
Patch from BARTKO, Zoltan <bartko.zoltan-AT-pobox.sk>
Prevent switching to previously used tool when typeing a backspace in document window.
M +7 -0 docwindow.cpp 1.4
M +5 -0 docwindow.h 1.5
M +2 -1 uml.cpp 1.90
--- kdesdk/umbrello/umbrello/docwindow.cpp #1.3:1.4
@@ -181,4 +181,11 @@ void DocWindow::newDocumentation( ) {
}
+bool DocWindow::isTyping()
+{
+ if (m_pDocMLE->hasFocus())
+ return true;
+ else
+ return false;
+}
#include "docwindow.moc"
--- kdesdk/umbrello/umbrello/docwindow.h #1.4:1.5
@@ -94,4 +94,9 @@ public:
void newDocumentation( );
+ /**
+ * Checks if the user is typing in the documentation edit window
+ */
+ bool isTyping();
+
private:
/**
--- kdesdk/umbrello/umbrello/uml.cpp #1.89:1.90
@@ -1381,4 +1381,5 @@ void UMLApp::keyReleaseEvent(QKeyEvent *
switch(e->key()) {
case Qt::Key_Backspace:
+ if (!m_pDocWindow->isTyping())
toolsbar->setOldTool();
e->accept();
More information about the umbrello-devel
mailing list