kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #20397
[PATCH] Fix assertion failure on attempt to orient a selected label
SCH_EDIT_FRAME::OnOrient uses SCH_COLLECTOR to filter for only orientable items. The problem is that it only does this for an unselected item. If the item is returned by SCH_SCREEN::GetCurItem it'll skip that part and go ahead trying to orient it. Then an assertion failure "Schematic object type %s cannot be oriented." is tripped.
The assertion is totally unnecessary; if the object cannot be oriented it should just silently not be oriented. This patch removes the assertion.
--
Chris
commit 38476e275176115f3a2a0fe838e92d2bf01559d3
Author: Chris Pavlina <cpavlin1@xxxxxxxxxxxxxx>
Date: Mon Sep 14 10:22:34 2015 -0400
Fix assertion failure on attempt to orient a selected label
diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp
index 320a47c..927e44c 100644
--- a/eeschema/schedit.cpp
+++ b/eeschema/schedit.cpp
@@ -1154,8 +1154,8 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
break;
default:
- wxFAIL_MSG( wxString::Format( wxT( "Schematic object type %s cannot be oriented." ),
- GetChars( item->GetClass() ) ) );
+ // This object cannot be oriented.
+ ;
}
if( item->GetFlags() == 0 )
Follow ups