src/glrenderer.h

changeset 1247
7e1ce2fc066b
parent 1246
0054d13ed614
child 1251
e75cc5bff076
--- a/src/glrenderer.h	Thu Feb 15 11:34:04 2018 +0200
+++ b/src/glrenderer.h	Thu Feb 15 12:18:57 2018 +0200
@@ -63,7 +63,7 @@
 	const Model* model() const;
 	QPoint const& mousePosition() const;
 	QPointF const& mousePositionF() const;
-	LDObject* objectAtCursor() const;
+	QPersistentModelIndex objectAtCursor() const;
 	QSet<LDObject*> pick(const QRect& range);
 	LDObject* pick(int mouseX, int mouseY);
 	void resetAllAngles();
@@ -84,7 +84,7 @@
 	static const GLRotationMatrix ldrawToGLAdapterMatrix;
 
 signals:
-	void objectHighlightingChanged(LDObject* object);
+	void objectHighlightingChanged(const QModelIndex& oldIndex, const QModelIndex& newIndex);
 
 protected:
 	void initializeGL();
@@ -118,7 +118,7 @@
 private:
 	const Model* const m_model;
 	class GLCompiler* m_compiler;
-	LDObject* m_objectAtCursor = nullptr;
+	QPersistentModelIndex m_objectAtCursor;
 	CameraIcon m_cameraIcons[7];
 	QTimer* m_toolTipTimer;
 	Qt::MouseButtons m_lastButtons;
@@ -151,7 +151,6 @@
 	void initializeLighting();
 	void initGLData();
 	void needZoomToFit();
-	Q_SLOT void removeObject(LDObject* object);
 	void setPicking(bool picking);
 	Q_SLOT void showCameraIconTooltip();
 	void zoomToFit();

mercurial