mirror of https://github.com/KLayout/klayout.git
commit
79f26fc380
|
|
@ -427,7 +427,9 @@ MainService::cm_flatten_insts ()
|
|||
|
||||
view ()->cancel_edits ();
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Flatten instances")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Flatten instances")));
|
||||
}
|
||||
|
||||
std::set<db::Layout *> needs_cleanup;
|
||||
|
||||
|
|
@ -470,7 +472,9 @@ MainService::cm_flatten_insts ()
|
|||
// The selection is no longer valid
|
||||
view ()->clear_selection ();
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -479,7 +483,9 @@ MainService::cm_move_hier_up ()
|
|||
view ()->cancel_edits ();
|
||||
check_no_guiding_shapes ();
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Move up in hierarchy")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Move up in hierarchy")));
|
||||
}
|
||||
|
||||
std::vector<edt::Service *> edt_services = view ()->get_plugins <edt::Service> ();
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
|
|
@ -529,7 +535,9 @@ MainService::cm_move_hier_up ()
|
|||
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -735,7 +743,9 @@ MainService::cm_make_cell_variants ()
|
|||
|
||||
view ()->cancel_edits ();
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Make cell variants for selection")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Make cell variants for selection")));
|
||||
}
|
||||
|
||||
std::vector<lay::ObjectInstPath> new_selection;
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
|
|
@ -906,7 +916,9 @@ MainService::cm_make_cell_variants ()
|
|||
i0 += n;
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -947,7 +959,9 @@ MainService::cm_resolve_arefs ()
|
|||
|
||||
std::vector<lay::ObjectInstPath> new_selection;
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Resolve array references")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Resolve array references")));
|
||||
}
|
||||
|
||||
for (std::vector<lay::ObjectInstPath>::const_iterator p = insts_to_resolve.begin (); p != insts_to_resolve.end (); ++p) {
|
||||
|
||||
|
|
@ -986,7 +1000,9 @@ MainService::cm_resolve_arefs ()
|
|||
|
||||
inst_service->set_selection (new_selection.begin (), new_selection.end ());
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1041,7 +1057,9 @@ MainService::cm_make_cell ()
|
|||
|
||||
view ()->cancel_edits ();
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Make cell from selection")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Make cell from selection")));
|
||||
}
|
||||
|
||||
db::cell_index_type target_ci = cv->layout ().add_cell (m_make_cell_name.c_str ());
|
||||
// create target cell
|
||||
|
|
@ -1090,7 +1108,9 @@ MainService::cm_make_cell ()
|
|||
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1106,7 +1126,9 @@ MainService::cm_convert_to_cell ()
|
|||
|
||||
try {
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Convert to static cell")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Convert to static cell")));
|
||||
}
|
||||
|
||||
std::vector<edt::Service *> edt_services = view ()->get_plugins <edt::Service> ();
|
||||
|
||||
|
|
@ -1158,10 +1180,14 @@ MainService::cm_convert_to_cell ()
|
|||
// The selection might no longer be valid
|
||||
view ()->clear_selection ();
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
} catch (...) {
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
@ -1265,7 +1291,9 @@ MainService::cm_convert_to_pcell ()
|
|||
|
||||
try {
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Convert to PCell")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Convert to PCell")));
|
||||
}
|
||||
|
||||
std::vector<edt::Service::obj_iterator> to_delete;
|
||||
std::vector<lay::ObjectInstPath> new_selection;
|
||||
|
|
@ -1351,10 +1379,14 @@ MainService::cm_convert_to_pcell ()
|
|||
#endif
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
} catch (...) {
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
@ -1546,7 +1578,9 @@ MainService::cm_round_corners ()
|
|||
ep.merge (out, primary, 0 /*min_wc*/, true /*resolve holes*/, true /*min coherence*/);
|
||||
|
||||
view ()->cancel_edits ();
|
||||
manager ()->transaction (tl::to_string (tr ("Corner rounding operation on selection")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Corner rounding operation on selection")));
|
||||
}
|
||||
|
||||
// Delete the current selection
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
|
|
@ -1586,7 +1620,9 @@ MainService::cm_round_corners ()
|
|||
}
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1672,7 +1708,9 @@ MainService::cm_size ()
|
|||
ep.size (primary, idx, idy, out, 2 /*mode, TODO: make variable*/, true /*resolve holes*/, true /*min coherence*/);
|
||||
|
||||
view ()->cancel_edits ();
|
||||
manager ()->transaction (tl::to_string (tr ("Sizing operation on selection")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Sizing operation on selection")));
|
||||
}
|
||||
|
||||
// Delete the current selection
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
|
|
@ -1712,7 +1750,9 @@ MainService::cm_size ()
|
|||
}
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1792,7 +1832,9 @@ MainService::boolean_op (int mode)
|
|||
}
|
||||
|
||||
view ()->cancel_edits ();
|
||||
manager ()->transaction (tl::to_string (tr ("Boolean operation on selection")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Boolean operation on selection")));
|
||||
}
|
||||
|
||||
// Delete the current selection
|
||||
// NOTE: we delete only those shapes from the primary layer and keep shapes from other layers.
|
||||
|
|
@ -1835,7 +1877,9 @@ MainService::boolean_op (int mode)
|
|||
}
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1955,7 +1999,9 @@ MainService::cm_align ()
|
|||
if (! prim_box.empty ()) {
|
||||
|
||||
view ()->cancel_edits ();
|
||||
manager ()->transaction (tl::to_string (tr ("Alignment")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Alignment")));
|
||||
}
|
||||
|
||||
// do the alignment
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
|
|
@ -1996,7 +2042,9 @@ MainService::cm_align ()
|
|||
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -2096,7 +2144,9 @@ MainService::cm_distribute ()
|
|||
|
||||
{
|
||||
view ()->cancel_edits ();
|
||||
manager ()->transaction (tl::to_string (tr ("Distribution")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Distribution")));
|
||||
}
|
||||
|
||||
// do the distribution
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
|
|
@ -2111,7 +2161,9 @@ MainService::cm_distribute ()
|
|||
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -2151,10 +2203,12 @@ MainService::cm_make_array ()
|
|||
bool has_undo = (m_array_na * m_array_nb < 1000);
|
||||
|
||||
// No undo support currently - the undo buffering is pretty inefficient right now.
|
||||
if (! has_undo) {
|
||||
manager ()->clear ();
|
||||
} else {
|
||||
manager ()->transaction (tl::to_string (tr ("Make array")));
|
||||
if (manager ()) {
|
||||
if (! has_undo) {
|
||||
manager ()->clear ();
|
||||
} else {
|
||||
manager ()->transaction (tl::to_string (tr ("Make array")));
|
||||
}
|
||||
}
|
||||
|
||||
tl::RelativeProgress progress (tl::to_string (tr ("Make array")), (size_t (m_array_na) * size_t (m_array_nb) - 1) * n, 1000);
|
||||
|
|
@ -2221,7 +2275,7 @@ MainService::cm_make_array ()
|
|||
|
||||
}
|
||||
|
||||
if (has_undo) {
|
||||
if (has_undo && manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
|
@ -2383,7 +2437,9 @@ MainService::cm_change_layer ()
|
|||
|
||||
view ()->cancel_edits ();
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Change layer")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Change layer")));
|
||||
}
|
||||
|
||||
db::Layout &layout = view ()->cellview (cv_index)->layout ();
|
||||
|
||||
|
|
@ -2441,7 +2497,9 @@ MainService::cm_change_layer ()
|
|||
// The selection is no longer valid
|
||||
view ()->clear_selection ();
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
} else {
|
||||
throw tl::Exception (tl::to_string (tr ("Nothing selected to switch layers for")));
|
||||
|
|
|
|||
|
|
@ -1788,7 +1788,9 @@ PartialService::mouse_click_event (const db::DPoint &p, unsigned int buttons, bo
|
|||
// stop dragging
|
||||
ui ()->ungrab_mouse (this);
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Partial move")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Partial move")));
|
||||
}
|
||||
|
||||
// heuristically, if there is just one edge selected: do not confine to the movement
|
||||
// angle constraint - the edge usually is confined enough
|
||||
|
|
@ -1796,7 +1798,9 @@ PartialService::mouse_click_event (const db::DPoint &p, unsigned int buttons, bo
|
|||
|
||||
transform_selection (move_trans);
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1983,7 +1987,9 @@ PartialService::mouse_double_click_event (const db::DPoint &p, unsigned int butt
|
|||
partial_objects::iterator r = m_selection.begin (); // we assert above that we have at least one selected element
|
||||
if (! r->first.is_cell_inst ()) {
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Insert point")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Insert point")));
|
||||
}
|
||||
|
||||
// snap the point
|
||||
db::DPoint new_point_d = snap (p);
|
||||
|
|
@ -2050,7 +2056,9 @@ PartialService::mouse_double_click_event (const db::DPoint &p, unsigned int butt
|
|||
|
||||
handle_guiding_shape_changes ();
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
selection_to_view ();
|
||||
|
||||
|
|
|
|||
|
|
@ -266,9 +266,13 @@ ShapeEditService::deliver_shape (const db::Polygon &poly)
|
|||
{
|
||||
if (m_combine_mode == CM_Add) {
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Create polygon")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create polygon")));
|
||||
}
|
||||
cell ().shapes (layer ()).insert (poly);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -326,7 +330,9 @@ ShapeEditService::deliver_shape (const db::Polygon &poly)
|
|||
result = input;
|
||||
}
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Combine shape with background")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Combine shape with background")));
|
||||
}
|
||||
|
||||
// Erase existing shapes
|
||||
for (std::vector<db::Shape>::const_iterator s = shapes.begin (); s != shapes.end (); ++s) {
|
||||
|
|
@ -341,7 +347,9 @@ ShapeEditService::deliver_shape (const db::Polygon &poly)
|
|||
cell ().shapes (layer ()).insert (*p);
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -350,9 +358,13 @@ void
|
|||
ShapeEditService::deliver_shape (const db::Path &path)
|
||||
{
|
||||
if (m_combine_mode == CM_Add) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create path")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create path")));
|
||||
}
|
||||
cell ().shapes (layer ()).insert (path);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
} else {
|
||||
deliver_shape (path.polygon ());
|
||||
}
|
||||
|
|
@ -362,9 +374,13 @@ void
|
|||
ShapeEditService::deliver_shape (const db::Box &box)
|
||||
{
|
||||
if (m_combine_mode == CM_Add) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create box")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create box")));
|
||||
}
|
||||
cell ().shapes (layer ()).insert (box);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
} else {
|
||||
deliver_shape (db::Polygon (box));
|
||||
}
|
||||
|
|
@ -912,9 +928,13 @@ TextService::do_finish_edit ()
|
|||
{
|
||||
get_edit_layer ();
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Create text")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create text")));
|
||||
}
|
||||
cell ().shapes (layer ()).insert (get_text ());
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
commit_recent (view ());
|
||||
|
||||
|
|
@ -1634,11 +1654,15 @@ InstService::do_finish_edit ()
|
|||
throw tl::Exception (tl::to_string (tr ("Inserting this instance would create a recursive hierarchy")));
|
||||
}
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Create instance")), m_reference_transaction_id);
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Create instance")), m_reference_transaction_id);
|
||||
}
|
||||
m_reference_transaction_id = 0;
|
||||
db::Instance i = cv->layout ().cell (cv.cell_index ()).insert (inst);
|
||||
cv->layout ().cleanup ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
commit_recent (view ());
|
||||
|
||||
|
|
|
|||
|
|
@ -1481,9 +1481,13 @@ Service::menu_activated (const std::string &symbol)
|
|||
{
|
||||
if (symbol == "img::clear_all_images") {
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Clear all images")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Clear all images")));
|
||||
}
|
||||
clear_images ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
} else if (symbol == "img::add_image") {
|
||||
|
||||
|
|
@ -1601,10 +1605,14 @@ Service::add_image ()
|
|||
|
||||
clear_selection ();
|
||||
|
||||
manager ()->transaction (tl::to_string (tr ("Add image")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (tr ("Add image")));
|
||||
}
|
||||
new_image->set_z_position (top_z_position ());
|
||||
mp_view->annotation_shapes ().insert (db::DUserObject (new_image));
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
} else {
|
||||
delete new_image;
|
||||
|
|
|
|||
|
|
@ -553,13 +553,19 @@ BEGIN_PROTECTED
|
|||
|
||||
FillParameters fp = get_fill_parameters ();
|
||||
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Fill")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Fill")));
|
||||
}
|
||||
|
||||
try {
|
||||
generate_fill (fp);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
} catch (...) {
|
||||
mp_view->manager ()->cancel ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->cancel ();
|
||||
}
|
||||
throw;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1814,10 +1814,14 @@ BEGIN_PROTECTED
|
|||
|
||||
cancel_exec ();
|
||||
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Delete all")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Delete all")));
|
||||
}
|
||||
mp_view->cancel ();
|
||||
issue_query (build_delete_expression (), 0, false);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
|
||||
END_PROTECTED
|
||||
}
|
||||
|
|
@ -1862,15 +1866,19 @@ BEGIN_PROTECTED
|
|||
|
||||
if (! sel.empty ()) {
|
||||
|
||||
if (sender () == delete_selected_button) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Delete selected")));
|
||||
} else {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Replace selected")));
|
||||
if (mp_view->manager ()) {
|
||||
if (sender () == delete_selected_button) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Delete selected")));
|
||||
} else {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Replace selected")));
|
||||
}
|
||||
}
|
||||
|
||||
mp_view->cancel ();
|
||||
issue_query (m_execute_query, &selected_items, false);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
|
||||
issue_query (m_find_query, 0, true);
|
||||
|
||||
|
|
@ -1889,10 +1897,14 @@ BEGIN_PROTECTED
|
|||
m_execute_query.clear ();
|
||||
m_find_query.clear ();
|
||||
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Replace all")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Replace all")));
|
||||
}
|
||||
mp_view->cancel ();
|
||||
issue_query (build_replace_expression (), 0, false);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
|
||||
END_PROTECTED
|
||||
}
|
||||
|
|
@ -1907,10 +1919,14 @@ BEGIN_PROTECTED
|
|||
m_execute_query.clear ();
|
||||
m_find_query.clear ();
|
||||
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Execute custom query")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Execute custom query")));
|
||||
}
|
||||
mp_view->cancel ();
|
||||
issue_query (tl::to_string (custom_query->toPlainText ()), 0, true);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
|
||||
END_PROTECTED
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3095,7 +3095,7 @@ LayoutViewBase::reload_layout (unsigned int cv_index)
|
|||
// when reading the file, it must have the layers created as well
|
||||
lay::CellView cv_empty;
|
||||
|
||||
handle = new lay::LayoutHandle (new db::Layout (manager ()), filename);
|
||||
handle = new lay::LayoutHandle (new db::Layout (is_editable (), manager ()), filename);
|
||||
handle->set_tech_name (technology);
|
||||
cv_empty.set (handle);
|
||||
|
||||
|
|
@ -3108,7 +3108,7 @@ LayoutViewBase::reload_layout (unsigned int cv_index)
|
|||
|
||||
// create a new handle
|
||||
lay::CellView cv;
|
||||
handle = new lay::LayoutHandle (new db::Layout (manager ()), filename);
|
||||
handle = new lay::LayoutHandle (new db::Layout (is_editable (), manager ()), filename);
|
||||
cv.set (handle);
|
||||
|
||||
try {
|
||||
|
|
@ -3337,7 +3337,7 @@ LayoutViewBase::create_layout (const std::string &technology, bool add_cellview,
|
|||
{
|
||||
const db::Technology *tech = db::Technologies::instance ()->technology_by_name (technology);
|
||||
|
||||
db::Layout *layout = new db::Layout (m_editable, manager ());
|
||||
db::Layout *layout = new db::Layout (is_editable (), manager ());
|
||||
if (tech) {
|
||||
layout->dbu (tech->dbu ());
|
||||
}
|
||||
|
|
@ -3364,7 +3364,7 @@ LayoutViewBase::load_layout (const std::string &filename, const db::LoadLayoutOp
|
|||
|
||||
// create a new layout handle
|
||||
lay::CellView cv;
|
||||
lay::LayoutHandle *handle = new lay::LayoutHandle (new db::Layout (manager ()), filename);
|
||||
lay::LayoutHandle *handle = new lay::LayoutHandle (new db::Layout (is_editable (), manager ()), filename);
|
||||
cv.set (handle);
|
||||
|
||||
unsigned int cv_index;
|
||||
|
|
|
|||
|
|
@ -510,9 +510,13 @@ CellSelectionForm::show_cell ()
|
|||
QModelIndexList sel = mp_ui->lv_cells->selectionModel ()->selectedIndexes ();
|
||||
for (QModelIndexList::const_iterator s = sel.begin (); s != sel.end (); ++s) {
|
||||
db::cell_index_type ci = model->cell (*s)->cell_index ();
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Show cells")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Show cells")));
|
||||
}
|
||||
mp_view->show_cell (ci, m_current_cv);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
model->signal_data_changed ();
|
||||
|
|
@ -532,9 +536,13 @@ CellSelectionForm::hide_cell ()
|
|||
QModelIndexList sel = mp_ui->lv_cells->selectionModel ()->selectedIndexes ();
|
||||
for (QModelIndexList::const_iterator s = sel.begin (); s != sel.end (); ++s) {
|
||||
db::cell_index_type ci = model->cell (*s)->cell_index ();
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Hide cells")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Hide cells")));
|
||||
}
|
||||
mp_view->hide_cell (ci, m_current_cv);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
model->signal_data_changed ();
|
||||
|
|
|
|||
|
|
@ -203,9 +203,11 @@ EditLineStylesForm::sel_changed (QListWidgetItem *, QListWidgetItem *)
|
|||
return;
|
||||
}
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Current style")));
|
||||
manager ()->queue (this, new CurrentStyleOp (m_selected, mp_ui->style_items->currentRow ()));
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Current style")));
|
||||
manager ()->queue (this, new CurrentStyleOp (m_selected, mp_ui->style_items->currentRow ()));
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
update_current_item ();
|
||||
}
|
||||
|
|
@ -257,7 +259,9 @@ EditLineStylesForm::select_item (int index)
|
|||
void
|
||||
EditLineStylesForm::new_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("New style")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("New style")));
|
||||
}
|
||||
|
||||
lay::LineStyleInfo s;
|
||||
s.set_pattern (0x55555555, 32);
|
||||
|
|
@ -266,13 +270,17 @@ EditLineStylesForm::new_button_clicked ()
|
|||
update ();
|
||||
select_item (oi + std::distance (m_styles.begin (), m_styles.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditLineStylesForm::clone_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clone style")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clone style")));
|
||||
}
|
||||
|
||||
lay::LineStyles::iterator c = current ();
|
||||
|
||||
|
|
@ -297,7 +305,9 @@ EditLineStylesForm::clone_button_clicked ()
|
|||
update ();
|
||||
select_item (oi + std::distance (m_styles.begin (), m_styles.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -315,7 +325,9 @@ EditLineStylesForm::delete_button_clicked ()
|
|||
}
|
||||
}
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Delete style")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Delete style")));
|
||||
}
|
||||
|
||||
if (mp_ui->style_items->currentRow () + 1 == mp_ui->style_items->count ()) {
|
||||
select_item (mp_ui->style_items->currentRow () - 1);
|
||||
|
|
@ -327,7 +339,9 @@ EditLineStylesForm::delete_button_clicked ()
|
|||
m_styles.renumber ();
|
||||
update ();
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -347,7 +361,9 @@ EditLineStylesForm::up_button_clicked ()
|
|||
for (lay::LineStyles::iterator i = m_styles.begin_custom (); i != m_styles.end (); ++i) {
|
||||
if (i->order_index () == oi - 1) {
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move style up")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move style up")));
|
||||
}
|
||||
|
||||
lay::LineStyleInfo info;
|
||||
info = *i;
|
||||
|
|
@ -361,7 +377,9 @@ EditLineStylesForm::up_button_clicked ()
|
|||
update ();
|
||||
select_item (oi - 2 + std::distance (m_styles.begin (), m_styles.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
|
@ -385,7 +403,9 @@ EditLineStylesForm::down_button_clicked ()
|
|||
for (lay::LineStyles::iterator i = m_styles.begin_custom (); i != m_styles.end (); ++i) {
|
||||
if (i->order_index () == oi + 1) {
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move style down")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move style down")));
|
||||
}
|
||||
|
||||
lay::LineStyleInfo info;
|
||||
info = *i;
|
||||
|
|
@ -399,7 +419,9 @@ EditLineStylesForm::down_button_clicked ()
|
|||
update ();
|
||||
select_item (oi + std::distance (m_styles.begin (), m_styles.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
|
@ -420,49 +442,73 @@ EditLineStylesForm::editor_size_changed ()
|
|||
void
|
||||
EditLineStylesForm::size_changed ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Change style size")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Change style size")));
|
||||
}
|
||||
mp_ui->editor->set_size (mp_ui->w_spin_box->value ());
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditLineStylesForm::invert_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Invert style")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Invert style")));
|
||||
}
|
||||
mp_ui->editor->invert ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditLineStylesForm::clear_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clear style")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clear style")));
|
||||
}
|
||||
mp_ui->editor->clear ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditLineStylesForm::fliph_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Flip style")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Flip style")));
|
||||
}
|
||||
mp_ui->editor->fliph ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditLineStylesForm::sleft_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift left")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift left")));
|
||||
}
|
||||
mp_ui->editor->shift (-1);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditLineStylesForm::sright_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift right")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift right")));
|
||||
}
|
||||
mp_ui->editor->shift (1);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -231,9 +231,11 @@ EditStipplesForm::sel_changed (QListWidgetItem *, QListWidgetItem *)
|
|||
return;
|
||||
}
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Current pattern")));
|
||||
manager ()->queue (this, new CurrentPatternOp (m_selected, mp_ui->stipple_items->currentRow ()));
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Current pattern")));
|
||||
manager ()->queue (this, new CurrentPatternOp (m_selected, mp_ui->stipple_items->currentRow ()));
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
update_current_item ();
|
||||
}
|
||||
|
|
@ -280,7 +282,9 @@ EditStipplesForm::select_item (int index)
|
|||
mp_ui->stipple_items->setCurrentItem (mp_ui->stipple_items->item (index));
|
||||
mp_ui->stipple_items->scrollToItem (mp_ui->stipple_items->currentItem ());
|
||||
|
||||
manager ()->queue (this, new CurrentPatternOp (m_selected, index));
|
||||
if (manager ()) {
|
||||
manager ()->queue (this, new CurrentPatternOp (m_selected, index));
|
||||
}
|
||||
|
||||
update_current_item ();
|
||||
|
||||
|
|
@ -290,7 +294,9 @@ EditStipplesForm::select_item (int index)
|
|||
void
|
||||
EditStipplesForm::new_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("New pattern")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("New pattern")));
|
||||
}
|
||||
|
||||
lay::DitherPatternInfo p;
|
||||
unsigned int oi = m_pattern.begin ()[m_pattern.add_pattern (p)].order_index () - 1;
|
||||
|
|
@ -298,13 +304,17 @@ EditStipplesForm::new_button_clicked ()
|
|||
update ();
|
||||
select_item (oi + std::distance (m_pattern.begin (), m_pattern.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::clone_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clone pattern")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clone pattern")));
|
||||
}
|
||||
|
||||
lay::DitherPattern::iterator c = current ();
|
||||
|
||||
|
|
@ -329,7 +339,9 @@ EditStipplesForm::clone_button_clicked ()
|
|||
update ();
|
||||
select_item (oi + std::distance (m_pattern.begin (), m_pattern.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -347,7 +359,9 @@ EditStipplesForm::delete_button_clicked ()
|
|||
}
|
||||
}
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Delete pattern")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Delete pattern")));
|
||||
}
|
||||
|
||||
if (mp_ui->stipple_items->currentRow () + 1 == mp_ui->stipple_items->count ()) {
|
||||
select_item (mp_ui->stipple_items->currentRow () - 1);
|
||||
|
|
@ -359,7 +373,9 @@ EditStipplesForm::delete_button_clicked ()
|
|||
m_pattern.renumber ();
|
||||
update ();
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -379,7 +395,9 @@ EditStipplesForm::up_button_clicked ()
|
|||
for (lay::DitherPattern::iterator i = m_pattern.begin_custom (); i != m_pattern.end (); ++i) {
|
||||
if (i->order_index () == oi - 1) {
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move pattern up")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move pattern up")));
|
||||
}
|
||||
|
||||
lay::DitherPatternInfo info;
|
||||
info = *i;
|
||||
|
|
@ -393,7 +411,9 @@ EditStipplesForm::up_button_clicked ()
|
|||
update ();
|
||||
select_item (oi - 2 + std::distance (m_pattern.begin (), m_pattern.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
|
@ -417,7 +437,9 @@ EditStipplesForm::down_button_clicked ()
|
|||
for (lay::DitherPattern::iterator i = m_pattern.begin_custom (); i != m_pattern.end (); ++i) {
|
||||
if (i->order_index () == oi + 1) {
|
||||
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move pattern down")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Move pattern down")));
|
||||
}
|
||||
|
||||
lay::DitherPatternInfo info;
|
||||
info = *i;
|
||||
|
|
@ -431,7 +453,9 @@ EditStipplesForm::down_button_clicked ()
|
|||
update ();
|
||||
select_item (oi + std::distance (m_pattern.begin (), m_pattern.begin_custom ()));
|
||||
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
|
@ -455,81 +479,121 @@ EditStipplesForm::editor_size_changed ()
|
|||
void
|
||||
EditStipplesForm::size_changed ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Change pattern size")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Change pattern size")));
|
||||
}
|
||||
mp_ui->editor->set_size (mp_ui->w_spin_box->value (), mp_ui->h_spin_box->value ());
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::invert_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Invert pattern")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Invert pattern")));
|
||||
}
|
||||
mp_ui->editor->invert ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::clear_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clear pattern")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Clear pattern")));
|
||||
}
|
||||
mp_ui->editor->clear ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::rotate_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Rotate pattern")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Rotate pattern")));
|
||||
}
|
||||
mp_ui->editor->rotate (90);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::fliph_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Flip horizontal")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Flip horizontal")));
|
||||
}
|
||||
mp_ui->editor->fliph ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::flipv_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Flip vertical")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Flip vertical")));
|
||||
}
|
||||
mp_ui->editor->flipv ();
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::sleft_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift left")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift left")));
|
||||
}
|
||||
mp_ui->editor->shift (-1, 0);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::sup_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift up")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift up")));
|
||||
}
|
||||
mp_ui->editor->shift (0, 1);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::sright_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift right")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift right")));
|
||||
}
|
||||
mp_ui->editor->shift (1, 0);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditStipplesForm::sdown_button_clicked ()
|
||||
{
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift down")));
|
||||
if (manager ()) {
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Shift down")));
|
||||
}
|
||||
mp_ui->editor->shift (0, -1);
|
||||
manager ()->commit ();
|
||||
if (manager ()) {
|
||||
manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -103,9 +103,13 @@ LayoutPropertiesForm::commit ()
|
|||
}
|
||||
|
||||
if (fabs (dbu - layout.dbu ()) > 1e-6) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Change layout's database unit")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Change layout's database unit")));
|
||||
}
|
||||
layout.dbu (dbu);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
}
|
||||
|
||||
// get the selected technology name
|
||||
|
|
@ -156,9 +160,13 @@ LayoutPropertiesForm::prop_pb_clicked ()
|
|||
lay::UserPropertiesForm props_form (this);
|
||||
if (props_form.show (mp_view, m_index, prop_id, layout.begin_meta (), layout.end_meta ())) {
|
||||
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Edit layout's user properties")));
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->transaction (tl::to_string (QObject::tr ("Edit layout's user properties")));
|
||||
}
|
||||
layout.prop_id (prop_id);
|
||||
mp_view->manager ()->commit ();
|
||||
if (mp_view->manager ()) {
|
||||
mp_view->manager ()->commit ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,7 +403,9 @@ BEGIN_PROTECTED
|
|||
}
|
||||
}
|
||||
|
||||
mp_private->view->manager ()->transaction (tl::to_string (QObject::tr ("New layer")));
|
||||
if (mp_private->view->manager ()) {
|
||||
mp_private->view->manager ()->transaction (tl::to_string (QObject::tr ("New layer")));
|
||||
}
|
||||
|
||||
unsigned int l = cv->layout ().insert_layer (lp);
|
||||
std::vector <unsigned int> nl;
|
||||
|
|
@ -411,7 +413,9 @@ BEGIN_PROTECTED
|
|||
mp_private->view->add_new_layers (nl, mp_private->cv_index);
|
||||
mp_private->view->update_content ();
|
||||
|
||||
mp_private->view->manager ()->commit ();
|
||||
if (mp_private->view->manager ()) {
|
||||
mp_private->view->manager ()->commit ();
|
||||
}
|
||||
|
||||
// NOTE: add_new_layers has triggered update_layer_list which already added the new layer
|
||||
set_current_layer (lp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue