mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-02 19:28:37 +02:00
Avoid a segfault while editing a ruler. This happens is both a selection and a transient selection is active.
This commit is contained in:
@@ -133,6 +133,12 @@ Object::Object (const ant::Object &d)
|
||||
// .. nothing else ..
|
||||
}
|
||||
|
||||
Object::~Object ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
|
||||
Object &
|
||||
Object::operator= (const ant::Object &d)
|
||||
{
|
||||
|
||||
@@ -137,6 +137,11 @@ public:
|
||||
*/
|
||||
Object &operator= (const ant::Object &d);
|
||||
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
~Object ();
|
||||
|
||||
/**
|
||||
* @brief Less operator
|
||||
*/
|
||||
|
||||
@@ -1009,6 +1009,7 @@ View::ruler (const ant::Object *r)
|
||||
void
|
||||
View::render (const lay::Viewport &vp, lay::ViewObjectCanvas &canvas)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
if (! mp_ruler) {
|
||||
return;
|
||||
}
|
||||
@@ -1700,6 +1701,7 @@ Service::end_move (const db::DPoint &, lay::angle_constraint_type)
|
||||
void
|
||||
Service::selection_to_view ()
|
||||
{
|
||||
clear_transient_selection ();
|
||||
annotation_selection_changed_event ();
|
||||
|
||||
// the selection objects need to be recreated since we destroyed the old rulers
|
||||
|
||||
@@ -195,7 +195,7 @@ AnnotationShapes::replace (iterator pos, const shape_type &&sh)
|
||||
manager ()->queue (this, new AnnotationLayerOp (true /*insert*/, sh));
|
||||
}
|
||||
invalidate_state (); // HINT: must come before the change is done!
|
||||
m_layer.replace (pos, sh);
|
||||
m_layer.replace (pos, std::move (sh));
|
||||
}
|
||||
return *pos;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user