readded object editing by double click in list view

Tue, 03 Apr 2018 17:32:02 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 03 Apr 2018 17:32:02 +0300
changeset 1373
e1380c0d4326
parent 1372
641060842b92
child 1374
d389af23fbfa

readded object editing by double click in list view

src/mainwindow.cpp file | annotate | diff | comparison | revisions
--- a/src/mainwindow.cpp	Tue Apr 03 17:23:02 2018 +0300
+++ b/src/mainwindow.cpp	Tue Apr 03 17:32:02 2018 +0300
@@ -155,6 +155,18 @@
 	}
 
 	QMetaObject::invokeMethod (this, "finishInitialization", Qt::QueuedConnection);
+
+	connect(
+		this->ui.objectList,
+		&QListView::doubleClicked,
+		[&](const QModelIndex& index)
+		{
+			LDObject* object = currentDocument()->lookup(index);
+
+			if (object)
+				::editObject(this, object);
+		}
+	);
 }
 
 void MainWindow::finishInitialization()

mercurial