summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2016-09-07 18:58:03 (GMT)
committerRalf Habacker <ralf.habacker@freenet.de>2016-09-07 19:01:38 (GMT)
commit11f026090b4dce75e08b2e50ae81d2a16b023c39 (patch)
treed38fbf36a2c2d0badf41fd7f85a1e28ef5affd83
parentd02e8a7e4d53e8ed2aac2de425c5ce554474e757 (diff)
Fix selecting of sorted entries in diagrams and stereotypes window.
We need to determine the correct index of a contained object through the proxy model.
-rw-r--r--umbrello/diagramswindow.cpp4
-rw-r--r--umbrello/stereotypeswindow.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/umbrello/diagramswindow.cpp b/umbrello/diagramswindow.cpp
index 038afc2..04c666c 100644
--- a/umbrello/diagramswindow.cpp
+++ b/umbrello/diagramswindow.cpp
@@ -64,7 +64,7 @@ void DiagramsWindow::modified()
void DiagramsWindow::slotDiagramsDoubleClicked(QModelIndex index)
{
- QVariant v = UMLApp::app()->document()->diagramsModel()->data(index, Qt::UserRole);
+ QVariant v = m_diagramsTree->model()->data(index, Qt::UserRole);
if (v.canConvert<UMLView*>()) {
UMLView *view = v.value<UMLView*>();
view->showPropertiesDialog(this);
@@ -73,7 +73,7 @@ void DiagramsWindow::slotDiagramsDoubleClicked(QModelIndex index)
void DiagramsWindow::slotDiagramsClicked(QModelIndex index)
{
- QVariant v = UMLApp::app()->document()->diagramsModel()->data(index, Qt::UserRole);
+ QVariant v = m_diagramsTree->model()->data(index, Qt::UserRole);
if (v.canConvert<UMLView*>()) {
UMLView *view = v.value<UMLView*>();
UMLApp::app()->setCurrentView(view, true);
diff --git a/umbrello/stereotypeswindow.cpp b/umbrello/stereotypeswindow.cpp
index c974fae..ccc5bba 100644
--- a/umbrello/stereotypeswindow.cpp
+++ b/umbrello/stereotypeswindow.cpp
@@ -64,7 +64,7 @@ void StereotypesWindow::modified()
void StereotypesWindow::slotStereotypesDoubleClicked(QModelIndex index)
{
- QVariant v = UMLApp::app()->document()->stereotypesModel()->data(index, Qt::UserRole);
+ QVariant v = m_stereotypesTree->model()->data(index, Qt::UserRole);
if (v.canConvert<UMLStereotype*>()) {
UMLStereotype *s = v.value<UMLStereotype*>();
s->showPropertiesDialog(this);