mirror of https://github.com/KLayout/klayout.git
Finish rulers by pressing the Enter key
This commit is contained in:
parent
ccd9952d49
commit
de70025316
|
|
@ -1878,9 +1878,23 @@ Service::mouse_double_click_event (const db::DPoint & /*p*/, unsigned int button
|
||||||
finish_drawing ();
|
finish_drawing ();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
bool
|
||||||
|
Service::key_event (unsigned int key, unsigned int buttons)
|
||||||
|
{
|
||||||
|
if (m_drawing && buttons == 0 && (key == lay::KeyEnter || key == lay::KeyReturn)) {
|
||||||
|
|
||||||
|
// ends the current ruler (specifically in multi-segment mode)
|
||||||
|
finish_drawing ();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lay::TwoPointSnapToObjectResult
|
lay::TwoPointSnapToObjectResult
|
||||||
|
|
|
||||||
|
|
@ -644,6 +644,7 @@ private:
|
||||||
virtual bool mouse_press_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
virtual bool mouse_press_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
||||||
virtual bool mouse_click_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
virtual bool mouse_click_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
||||||
virtual bool mouse_double_click_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
virtual bool mouse_double_click_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
||||||
|
virtual bool key_event (unsigned int key, unsigned int buttons);
|
||||||
virtual void deactivated ();
|
virtual void deactivated ();
|
||||||
|
|
||||||
void snap_rulers (lay::angle_constraint_type ac);
|
void snap_rulers (lay::angle_constraint_type ac);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue