diff --git a/src/lay/lay/gsiDeclLayPlugin.cc b/src/lay/lay/gsiDeclLayPlugin.cc index 458e6954f..5ac999e8a 100644 --- a/src/lay/lay/gsiDeclLayPlugin.cc +++ b/src/lay/lay/gsiDeclLayPlugin.cc @@ -698,7 +698,9 @@ public: } else { std::vector pages; for (auto p = eo_pages->pages ().begin (); p != eo_pages->pages ().end (); ++p) { - pages.push_back (*p); + if ((*p)->plugin_declaration () == plugin_declaration ()) { + pages.push_back (*p); + } } return pages; } diff --git a/testdata/ruby/layPluginTests.rb b/testdata/ruby/layPluginTests.rb index cdd5638b6..41b91c053 100644 --- a/testdata/ruby/layPluginTests.rb +++ b/testdata/ruby/layPluginTests.rb @@ -37,6 +37,18 @@ class PluginFactory < RBA::PluginFactory end end +class Plugin2EditorOptionsPage < RBA::EditorOptionsPage + def initialize + super("title", 1) + end +end + +class Plugin2ConfigPage < RBA::ConfigPage + def initialize + super("title") + end +end + class Plugin2 < RBA::Plugin def set_tp(tp) @tp = tp @@ -51,16 +63,32 @@ end class PluginFactory2 < RBA::PluginFactory def initialize() - register(1001, "plugin_for_test2", "Plugin2") + @ep = 0 + @cp = 0 @pi = nil + register(1001, "plugin_for_test2", "Plugin2") end def create_plugin(manager, unused, view) @pi = Plugin2::new @pi end + def create_editor_options_pages + add_editor_options_page(Plugin2EditorOptionsPage::new) + @ep += 1 + end + def create_config_pages + add_config_page(Plugin2ConfigPage::new) + @cp += 1 + end def pi @pi end + def ep + @ep + end + def cp + @cp + end end class LayPlugin_TestClass < TestBase @@ -114,6 +142,11 @@ class LayPlugin_TestClass < TestBase pi2.set_tp(nil) assert_equal(pi2.has_tracking_position_test, false) + assert_equal(dpi2.ep, 1) + assert_equal(dpi2.cp, 1) + assert_equal(pi2.editor_options_pages.size, 1) + assert_equal(pi2.editor_options_pages[0].class.to_s, "Plugin2EditorOptionsPage") + pi.configure_test("edit-grid", "0.0") assert_equal(pi.snap(RBA::DPoint::new(0.01, 0.02)).to_s, "0.01,0.02") assert_equal(pi.snap(RBA::DVector::new(0.01, 0.02)).to_s, "0.01,0.02")