summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <[email protected]>2015-06-03 22:17:23 +0200
committerRalf Habacker <[email protected]>2015-06-03 22:17:23 +0200
commit7ba199a9002adafc02a623d8e92e70a1afa61b2d (patch)
tree36cd5e634467f61505d7f486a3ea649fb6abc482
parent895d312bf5eb4898e8aadcae7106190475a22897 (diff)
Merge in class SelectOperationDialog fix from frameworks branch.
The fix is: Disable okay button if no custom operation is entered and no class method is selected.
-rw-r--r--umbrello/dialogs/selectoperationdialog.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/umbrello/dialogs/selectoperationdialog.cpp b/umbrello/dialogs/selectoperationdialog.cpp
index 1ed2936..b1632aa 100644
--- a/umbrello/dialogs/selectoperationdialog.cpp
+++ b/umbrello/dialogs/selectoperationdialog.cpp
@@ -178,6 +178,9 @@ void SelectOperationDialog::slotIndexChanged(int index)
m_id = OP;
enableButtonOk(true);
}
+ if (m_pOpCB->currentText().isEmpty()) {
+ enableButtonOk(false);
+ }
}
/**
@@ -185,7 +188,10 @@ void SelectOperationDialog::slotIndexChanged(int index)
*/
void SelectOperationDialog::slotTextChanged(const QString &text)
{
- if (!text.isEmpty()) {
+ if (text.isEmpty()) {
+ enableButtonOk(false);
+ }
+ else {
m_pOpCB->setCurrentIndex(-1);
m_id = CUSTOM;
enableButtonOk(true);