- a more elegant fix to the problem addressed in the previous commit

Sat, 06 Sep 2014 23:21:28 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sat, 06 Sep 2014 23:21:28 +0300
changeset 881
82a9c3549db1
parent 880
5dcd2e741d1c
child 882
2f3cc8e045d5

- a more elegant fix to the problem addressed in the previous commit

src/ldDocument.cc file | annotate | diff | comparison | revisions
src/ldObject.cc file | annotate | diff | comparison | revisions
--- a/src/ldDocument.cc	Sat Sep 06 23:18:26 2014 +0300
+++ b/src/ldDocument.cc	Sat Sep 06 23:21:28 2014 +0300
@@ -159,9 +159,6 @@
 	if (IsExiting())
 		return;
 
-	for (LDObjectPtr obj : m_objects)
-		obj->setSelected (false);
-
 	g_allDocuments.removeOne (self());
 	m_flags |= DOCF_IsBeingDestroyed;
 	delete m_history;
--- a/src/ldObject.cc	Sat Sep 06 23:18:26 2014 +0300
+++ b/src/ldObject.cc	Sat Sep 06 23:21:28 2014 +0300
@@ -308,7 +308,7 @@
 		return;
 
 	// If this object was selected, unselect it now
-	if (isSelected())
+	if (isSelected() and document() != null)
 		deselect();
 
 	// If this object was associated to a file, remove it off it now

mercurial