Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/doc/doc/manual/view_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
they show the same region of the layout. This option can be useful if two layouts are loaded in
different views for clarity, but identical regions need to be inspected.
</li>
<li>
<b>Synchronized Layers</b>: matching layers in different views (tabs) share their visibility.
Visibility changes in the active view are copied to other open views. Layers present in only one
view keep their own visibility. Layer colors and other display properties remain independent.
</li>
<li>
<b>Select Top Level Objects</b>: this menu item gives a quick access to the respective editor
option. If this option is checked, only objects from the top level are selected. This is
Expand All @@ -60,4 +65,3 @@
</doc>



24 changes: 23 additions & 1 deletion src/lay/lay/MainConfigPage2.ui
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>80</height>
<height>140</height>
</rect>
</property>
<property name="windowTitle" >
Expand Down Expand Up @@ -44,6 +44,28 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="buttonGroupLayers" >
<property name="title" >
<string> Synchronized Layers </string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QCheckBox" name="sync_layers_cbx" >
<property name="text" >
<string>All views show the same layers</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
Expand Down
1 change: 1 addition & 0 deletions src/lay/lay/layConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace lay
static const std::string cfg_default_grids ("default-grids");
static const std::string cfg_circle_points ("circle-points");
static const std::string cfg_synchronized_views ("synchronized-views");
static const std::string cfg_synchronized_layers ("synchronized-layers");
static const std::string cfg_edit_mode ("edit-mode");
static const std::string cfg_custom_macro_paths ("custom-macro-paths");
static const std::string cfg_mru ("mru");
Expand Down
7 changes: 5 additions & 2 deletions src/lay/lay/layMainConfigPages.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class MainPluginDeclaration
options.push_back (std::pair<std::string, std::string> (cfg_edit_mode, "false"));
options.push_back (std::pair<std::string, std::string> (cfg_custom_macro_paths, ""));
options.push_back (std::pair<std::string, std::string> (cfg_synchronized_views, "false"));
options.push_back (std::pair<std::string, std::string> (cfg_synchronized_layers, "false"));
options.push_back (std::pair<std::string, std::string> (cfg_default_grids, "0.01,0.005,0.001"));
options.push_back (std::pair<std::string, std::string> (cfg_mru, ""));
options.push_back (std::pair<std::string, std::string> (cfg_mru_sessions, ""));
Expand Down Expand Up @@ -100,7 +101,7 @@ class MainPluginDeclaration
pages.push_back (std::make_pair (tl::to_string (QObject::tr ("Application|Customize Menu")), new CustomizeMenuConfigPage (parent)));
pages.push_back (std::make_pair (tl::to_string (QObject::tr ("Application|Units")), new MainConfigPage5 (parent)));
pages.push_back (std::make_pair (tl::to_string (QObject::tr ("Application|Circles")), new MainConfigPage6 (parent)));
pages.push_back (std::make_pair (tl::to_string (QObject::tr ("Display|Synchronized Views")), new MainConfigPage2 (parent)));
pages.push_back (std::make_pair (tl::to_string (QObject::tr ("Display|Synchronization")), new MainConfigPage2 (parent)));
return pages;
}
};
Expand Down Expand Up @@ -245,12 +246,15 @@ MainConfigPage2::setup (lay::Dispatcher *root)
bool flag = false;
root->config_get (cfg_synchronized_views, flag);
mp_ui->sync_views_cbx->setChecked (flag);
root->config_get (cfg_synchronized_layers, flag);
mp_ui->sync_layers_cbx->setChecked (flag);
}

void
MainConfigPage2::commit (lay::Dispatcher *root)
{
root->config_set (cfg_synchronized_views, mp_ui->sync_views_cbx->isChecked ());
root->config_set (cfg_synchronized_layers, mp_ui->sync_layers_cbx->isChecked ());
}

// -------------------------------------------------------------
Expand Down Expand Up @@ -753,4 +757,3 @@ CustomizeMenuConfigPage::current_changed (QTreeWidgetItem *current, QTreeWidgetI
}

}

Loading
Loading