Fix : Composite text dialog widget can't be selected when he is open by the element properties dialog widget

Fix : The ui freeze when use the drag and drop in the tab widget "texts" of element properties, when he is displayed by the element properties dialog widget.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5268 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-03-13 16:20:59 +00:00
parent 1077c91b6f
commit f2fd446bb5
2 changed files with 7 additions and 4 deletions

View File

@@ -91,6 +91,9 @@ void Element::editProperty()
ElementPropertiesWidget *epw = new ElementPropertiesWidget(this);
PropertiesEditorDialog dialog(epw, QApplication::activeWindow());
connect(epw, &ElementPropertiesWidget::findEditClicked, &dialog, &QDialog::reject);
//Must be windowModal, else when user do a drag and drop
//with the "text" tab of ElementPropertiesWidget, the ui freeze, until user press escape key
dialog.setWindowModality(Qt::WindowModal);
dialog.exec();
}
}

View File

@@ -963,7 +963,7 @@ QMimeData *DynamicElementTextModel::mimeData(const QModelIndexList &indexes) con
}
}
return new QMimeData();
return QStandardItemModel::mimeData(indexes);
}
/**
@@ -1355,7 +1355,7 @@ QWidget *DynamicTextItemDelegate::createEditor(QWidget *parent, const QStyleOpti
if(!deti)
break;
CompositeTextEditDialog *cted = new CompositeTextEditDialog(deti);
CompositeTextEditDialog *cted = new CompositeTextEditDialog(deti, parent);
cted->setObjectName("composite_text");
return cted;
}