Merge branch 'master' into lefdef-enhancments

This commit is contained in:
Matthias Koefferlein
2020-05-01 16:00:58 +02:00
656 changed files with 29174 additions and 28910 deletions
+18 -7
View File
@@ -412,19 +412,16 @@ static lay::LayoutView *new_view (QWidget *parent, bool editable, db::Manager *m
}
return lv;
}
#else
static lay::LayoutView *new_view (tl::Variant /*dummy*/, bool editable, db::Manager *manager, unsigned int options)
#endif
static lay::LayoutView *new_view2 (bool editable, db::Manager *manager, unsigned int options)
{
return new lay::LayoutView (manager, editable, 0 /*plugin parent*/, 0 /*parent*/, "view", options);
}
#endif
Class<lay::LayoutView> decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutView",
#if defined(HAVE_QTBINDINGS)
gsi::constructor ("new", &new_view, gsi::arg ("parent", (QWidget *) 0, "nil"), gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0),
#else
gsi::constructor ("new", &new_view, gsi::arg ("parent", tl::Variant (), "nil"), gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0),
#endif
gsi::constructor ("new", &new_view, gsi::arg ("parent"), gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0),
"@brief Creates a standalone view\n"
"\n"
"This constructor is for special purposes only. To create a view in the context of a main window, "
@@ -438,6 +435,20 @@ Class<lay::LayoutView> decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou
"This constructor has been introduced in version 0.25.\n"
"It has been enhanced with the arguments in version 0.27.\n"
) +
#endif
gsi::constructor ("new", &new_view2, gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0),
"@brief Creates a standalone view\n"
"\n"
"This constructor is for special purposes only. To create a view in the context of a main window, "
"use \\MainWindow#create_view and related methods.\n"
"\n"
"@param editable True to make the view editable\n"
"@param manager The \\Manager object to enable undo/redo\n"
"@param options A combination of the values in the LV_... constants\n"
"\n"
"This constructor has been introduced in version 0.25.\n"
"It has been enhanced with the arguments in version 0.27.\n"
) +
gsi::constant ("LV_NoLayers", (unsigned int) lay::LayoutView::LV_NoLayers,
"@brief With this option, no layers view will be provided (see \\layer_control_frame)\n"
"Use this value with the constructor's 'options' argument.\n"
+1 -2
View File
@@ -1675,7 +1675,6 @@ LayoutView::enable_edits (bool enable)
if (m_disabled_edits > 0) {
--m_disabled_edits;
}
enable = (m_disabled_edits == 0);
} else {
++m_disabled_edits;
}
@@ -6815,7 +6814,7 @@ LayoutView::menu_activated (const std::string &symbol)
}
} else if (symbol == "cm_delete_layer") {
if (active_cellview_index () >= 0) {
cm_edit_layer ();
cm_delete_layer ();
}
} else if (symbol == "cm_clear_layer") {
if (active_cellview_index () >= 0) {
@@ -1131,11 +1131,10 @@ LayoutViewConfigPage6::stipple_button_clicked ()
if (m_palette.stipples () > i) {
unsigned int s = m_palette.stipple_by_index (i);
SelectStippleForm stipples_form (0, m_pattern);
if (stipples_form.exec () && stipples_form.selected () >= 0) {
s = stipples_form.selected ();
unsigned int s = stipples_form.selected ();
m_manager.transaction (tl::to_string (QObject::tr ("Set stipple")));
m_manager.queue (this, new StipplePaletteOp (m_palette, false, true /*before*/));
@@ -1350,11 +1349,10 @@ LayoutViewConfigPage6a::line_style_button_clicked ()
if (m_palette.styles () > i) {
unsigned int s = m_palette.style_by_index (i);
SelectLineStyleForm styles_form (0, m_style);
if (styles_form.exec () && styles_form.selected () >= 0) {
s = styles_form.selected ();
unsigned int s = styles_form.selected ();
m_manager.transaction (tl::to_string (QObject::tr ("Set style")));
m_manager.queue (this, new LineStylePaletteOp (m_palette, true /*before*/));