mirror of https://github.com/KLayout/klayout.git
Two small improvements
1. point-like selections use pan-to-selection instead of zoom-to-selection 2. Drawing texts on hidden layers: one warning less about drawing on a hidden layer
This commit is contained in:
parent
989f80e1a6
commit
c0059959b8
|
|
@ -157,14 +157,9 @@ TextService::get_text () const
|
|||
void
|
||||
TextService::do_finish_edit ()
|
||||
{
|
||||
get_edit_layer ();
|
||||
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create text")));
|
||||
}
|
||||
cell ().shapes (layer ()).insert (get_text ());
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
{
|
||||
db::Transaction transaction (manager (), tl::to_string (tr ("Create text")));
|
||||
cell ().shapes (layer ()).insert (get_text ());
|
||||
}
|
||||
|
||||
commit_recent ();
|
||||
|
|
|
|||
|
|
@ -5608,7 +5608,7 @@ LayoutViewBase::paste ()
|
|||
|
||||
db::DBox sel_bbox = selection_bbox ();
|
||||
if (! sel_bbox.empty ()) {
|
||||
if (m_paste_display_mode == 1) {
|
||||
if (m_paste_display_mode == 1 || (m_paste_display_mode == 2 && sel_bbox.is_point ())) {
|
||||
// just make selection visible, i.e. shift window somewhat
|
||||
pan_center (sel_bbox.center ());
|
||||
} else if (m_paste_display_mode == 2) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue