mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-02 19:28:37 +02:00
Merge remote-tracking branch 'origin/master' into feature/issue-2337
This commit is contained in:
@@ -49,6 +49,7 @@ class ConfigureAction;
|
||||
* @brief A delegate by which the dispatcher can submit notification events
|
||||
*/
|
||||
class LAYBASIC_PUBLIC DispatcherDelegate
|
||||
: public tl::Object
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@@ -271,7 +272,7 @@ private:
|
||||
#if defined(HAVE_QT)
|
||||
QWidget *mp_menu_parent_widget;
|
||||
#endif
|
||||
DispatcherDelegate *mp_delegate;
|
||||
tl::weak_ptr<DispatcherDelegate> mp_delegate;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
/**
|
||||
* @brief Gets a value indicating whether the page is for that specific plugin (given by a declaration object)
|
||||
*/
|
||||
bool for_plugin_declaration (const lay::PluginDeclaration *pd)
|
||||
bool for_plugin_declaration (const lay::PluginDeclaration *pd) const
|
||||
{
|
||||
return m_plugin_declarations.find (pd) != m_plugin_declarations.end ();
|
||||
}
|
||||
|
||||
@@ -947,8 +947,10 @@ LayoutCanvas::screenshot ()
|
||||
void
|
||||
LayoutCanvas::resize_event (unsigned int width, unsigned int height)
|
||||
{
|
||||
unsigned int w = width * dpr () + 0.5, h = height * dpr () + 0.5;
|
||||
unsigned int wl = width * m_oversampling * dpr () + 0.5, hl = height * m_oversampling * dpr () + 0.5;
|
||||
unsigned int w = (unsigned int) ceil (width * dpr () - db::epsilon);
|
||||
unsigned int h = (unsigned int) ceil (height * dpr () - db::epsilon);
|
||||
unsigned int wl = w * m_oversampling;
|
||||
unsigned int hl = h * m_oversampling;
|
||||
|
||||
if (m_viewport.width () != w || m_viewport.height () != h ||
|
||||
m_viewport_l.width () != wl || m_viewport_l.height () != hl) {
|
||||
@@ -957,8 +959,8 @@ LayoutCanvas::resize_event (unsigned int width, unsigned int height)
|
||||
m_image_cache.clear ();
|
||||
|
||||
// set the viewport to the new size
|
||||
m_viewport.set_size (width * dpr () + 0.5, height * dpr () + 0.5);
|
||||
m_viewport_l.set_size (width * m_oversampling * dpr () + 0.5, height * m_oversampling * dpr () + 0.5);
|
||||
m_viewport.set_size (w, h);
|
||||
m_viewport_l.set_size (wl, hl);
|
||||
|
||||
mouse_event_trans (db::DCplxTrans (1.0 / dpr ()) * m_viewport.trans ());
|
||||
do_redraw_all (true);
|
||||
|
||||
@@ -2225,6 +2225,14 @@ public:
|
||||
return pi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the active plugin
|
||||
*/
|
||||
lay::Plugin *active_plugin () const
|
||||
{
|
||||
return mp_active_plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Create a plugin of the given type
|
||||
*
|
||||
@@ -3214,11 +3222,6 @@ protected:
|
||||
|
||||
void init (db::Manager *mgr);
|
||||
|
||||
lay::Plugin *active_plugin () const
|
||||
{
|
||||
return mp_active_plugin;
|
||||
}
|
||||
|
||||
virtual LayoutView *get_ui ();
|
||||
|
||||
bool configure (const std::string &name, const std::string &value);
|
||||
|
||||
@@ -48,6 +48,12 @@ public:
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_layers_always_show_ld, "true"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_layers_always_show_layout_index, "false"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_test_shapes_in_view, "false"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_layer_search_as_expressions, "true"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_layer_search_as_filter, "false"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_layer_search_case_sensitive, "true"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_cell_search_as_expressions, "true"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_cell_search_as_filter, "false"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_cell_search_case_sensitive, "true"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_flat_cell_list, "false"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_split_cell_list, "false"));
|
||||
options.push_back (std::pair<std::string, std::string> (cfg_cell_list_sorting, "by-name"));
|
||||
|
||||
@@ -437,9 +437,12 @@ MoveService::drag_cancel ()
|
||||
{
|
||||
m_shift = db::DPoint ();
|
||||
if (m_dragging) {
|
||||
|
||||
show_toolbox (false);
|
||||
ui ()->ungrab_mouse (this);
|
||||
|
||||
m_dragging = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -332,6 +332,14 @@ public:
|
||||
{
|
||||
return new SelectionService (view);
|
||||
}
|
||||
|
||||
virtual std::vector<std::string> additional_editor_options_pages () const
|
||||
{
|
||||
std::vector<std::string> names;
|
||||
// TODO: provide in a central place instead of borrowing from the edt module
|
||||
names.push_back ("GenericEditorOptions");
|
||||
return names;
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> selection_service_decl (new SelectionServiceDeclaration (), -980, "laybasic::SelectionServicePlugin");
|
||||
|
||||
@@ -135,6 +135,13 @@ static const std::string cfg_layers_always_show_layout_index ("layers-always-sho
|
||||
static const std::string cfg_reader_options_show_always ("reader-options-show-always");
|
||||
static const std::string cfg_tip_window_hidden ("tip-window-hidden");
|
||||
|
||||
static const std::string cfg_layer_search_as_expressions ("layer-search-as-expressions");
|
||||
static const std::string cfg_layer_search_as_filter ("layer-search-as-filter");
|
||||
static const std::string cfg_layer_search_case_sensitive ("layer-search-case-sensitive");
|
||||
static const std::string cfg_cell_search_as_expressions ("cell-search-as-expressions");
|
||||
static const std::string cfg_cell_search_as_filter ("cell-search-as-filter");
|
||||
static const std::string cfg_cell_search_case_sensitive ("cell-search-case-sensitive");
|
||||
|
||||
static const std::string cfg_bitmap_oversampling ("bitmap-oversampling");
|
||||
static const std::string cfg_highres_mode ("highres-mode");
|
||||
static const std::string cfg_subres_mode ("subres-mode");
|
||||
|
||||
Reference in New Issue
Block a user