惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
Microsoft Azure Blog
Microsoft Azure Blog
云风的 BLOG
云风的 BLOG
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
Hugging Face - Blog
Hugging Face - Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
The GitHub Blog
The GitHub Blog
P
Privacy International News Feed
WordPress大学
WordPress大学
U
Unit 42
S
Securelist
T
The Exploit Database - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
Latest news
Latest news
Hacker News: Ask HN
Hacker News: Ask HN
小众软件
小众软件
Know Your Adversary
Know Your Adversary
The Cloudflare Blog
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
Security Latest
Security Latest
Google DeepMind News
Google DeepMind News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - Franky
Y
Y Combinator Blog
博客园 - 叶小钗
Security Archives - TechRepublic
Security Archives - TechRepublic
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
S
Secure Thoughts
T
Threat Research - Cisco Blogs
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
M
MIT News - Artificial intelligence

inkscape:windows_ci_14x commits

Update WIndows dependencies to r180 (995a0ec3) · Commits · René de Hesselle / inkscape · GitLab Fix Welcome dialog stacking up when run more than once (eab9c6d5) · Commits · René de Hesselle / inkscape · GitLab Edit label and tooltip for Preserve Shape setting (4c992ff3) · Commits · René de Hesselle / inkscape · GitLab Fix keyboard navigation in Objects dialog (38acd49e) · Commits · René de Hesselle / inkscape · GitLab update translations (9f8f2fec) · Commits · René de Hesselle / inkscape · GitLab Fix missing signal blocking in page toolbar (d5533a4b) · Commits · René de Hesselle / inkscape · GitLab Convert libuemf to a git submodule (22344d42) · Commits · René de Hesselle / inkscape · GitLab update translations (f5993d7c) · Commits · René de Hesselle / inkscape · GitLab update translations (fcd03438) · Commits · René de Hesselle / inkscape · GitLab Fix: request display update when removing child from group (6908c07a) · Commits · René de Hesselle / inkscape · GitLab Make po submodule shallow (90eced57) · Commits · René de Hesselle / inkscape · GitLab 1.4.3 (0d15f750) · Commits · René de Hesselle / inkscape · GitLab update translations (4d3a6d61) · Commits · René de Hesselle / inkscape · GitLab Update tutorials and man page for Inkscape 1.4.3 (excluding French) (bec26502) · Commits · René de Hesselle / inkscape · GitLab Add GioWin32-2.0.typelib to Windows (eb2146c6) · Commits · René de Hesselle / inkscape · GitLab Revert the backport of a fix causing regressions in textPath (7d1c0165) · Commits · René de Hesselle / inkscape · GitLab update translations (8a1e7745) · Commits · René de Hesselle / inkscape · GitLab Update Windows dependencies to r168 (9500139e) · Commits · René de Hesselle / inkscape · GitLab Build GraphicsMagick on Windows ourselves again (2ea69ea8) · Commits · René de Hesselle / inkscape · GitLab Prepare 1.4.3 (e2afff01) · Commits · René de Hesselle / inkscape · GitLab Update docs for 1.4.3rc (ea3d7619) · Commits · René de Hesselle / inkscape · GitLab Fix crash on MacOS when opening file by right clicking on file. (fe96d51c) · Commits · René de Hesselle / inkscape · GitLab Update macOS build pipeline to v0.82-2-g21f3e2d (56605ae7) · Commits · René de Hesselle / inkscape · GitLab Fix commands toolbar glitching at exact size (b8376295) · Commits · René de Hesselle / inkscape · GitLab Add commands toolbar to automatic toolbar policy (c37cea70) · Commits · René de Hesselle / inkscape · GitLab update translations (dfc0fde0) · Commits · René de Hesselle / inkscape · GitLab Fix welcome dialog graphics (8d76d570) · Commits · René de Hesselle / inkscape · GitLab Fix code getting items under cursor (441f5bfb) · Commits · René de Hesselle / inkscape · GitLab Make libdepixelize a submodule (09a2712d) · Commits · René de Hesselle / inkscape · GitLab Handle `xml:lang`/`lang` attribute updates (7fa5d668) · Commits · René de Hesselle / inkscape · GitLab Add missed 1.4.3 artwork (9d406cab) · Commits · René de Hesselle / inkscape · GitLab Set Pango context language to undetermined (bc80df21) · Commits · René de Hesselle / inkscape · GitLab Update macOS build pipeline to 0.82 (7348d729) · Commits · René de Hesselle / inkscape · GitLab Make popovers stay open on spinbutton activate (03c3f33d) · Commits · René de Hesselle / inkscape · GitLab Add 'webp' to the list of file formats that Inkscape can import on MacOS. (76e716a7) · Commits · René de Hesselle / inkscape · GitLab Fix crash in LPE path Parameters (ae36951b) · Commits · René de Hesselle / inkscape · GitLab Add 'jpg' and 'jpeg' to the list of file formats that Inkscape can import on MacOS. (81feda7b) · Commits · René de Hesselle / inkscape · GitLab Fix action accidentally marked for translation (a1a3cc5a) · Commits · René de Hesselle / inkscape · GitLab SPLPEItem: ref group objects before recursion (d8cf3584) · Commits · René de Hesselle / inkscape · GitLab
Batch updates to layer selector (5433ba34) · Commits · René de Hesselle / inkscape · GitLab
PBS · 2025-12-04 · via inkscape:windows_ci_14x commits
Commit 5433ba34 authored by PBS's avatar PBS Committed by Willy (Wen-Wei) Kao
Browse files

Batch updates to layer selector

The layer selector can receive a lot of unbatched updates from ObjectSet
during an ungroup. Coupled with Gtk::CssProvider::load_from_data()
usage, this is very slow. Limit updates to one per frame.

Robustify the lifecycle management of LayerSelector, by stopping _layer
dangling and detaching _observer properly.

Fixes inkscape/inkscape#5988
Original line number Diff line number Diff line
@@ -115,19 +115,25 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
    Gtk::StyleContext::add_provider_for_screen(_layer_label.get_screen(), _label_style,
                                               GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

    _observer->signal_changed().connect(sigc::mem_fun(*this, &LayerSelector::_layerModified));
    _observer->signal_changed().connect([this] { _queueUpdate(); });
    setDesktop(desktop);
}

LayerSelector::~LayerSelector() {
    setDesktop(nullptr);
}
LayerSelector::~LayerSelector() = default;

void LayerSelector::setDesktop(SPDesktop *desktop) {
    if ( desktop == _desktop )
void LayerSelector::setDesktop(SPDesktop *desktop)
{
    if (desktop == _desktop) {
        return;
    }

    if (_desktop) {
        _cancelUpdate();
        _layer_changed.disconnect();
        _layer = nullptr;
        _observer->set(nullptr);
    }

    _desktop = desktop;

    if (_desktop) {
@@ -143,7 +149,30 @@ void LayerSelector::_layerChanged(SPGroup *layer)
{
    _layer = layer;
    _observer->set(layer);
    _queueUpdate();
}

void LayerSelector::_queueUpdate()
{
    if (_tick_callback) {
        return;
    }

    _tick_callback = add_tick_callback([this] (Glib::RefPtr<Gdk::FrameClock> const &) {
        _layerModified();
        _tick_callback = 0;
        return false;
    });
}

void LayerSelector::_cancelUpdate()
{
    if (!_tick_callback) {
        return;
    }

    remove_tick_callback(_tick_callback);
    _tick_callback = 0;
}

/**
Original line number Diff line number Diff line
@@ -65,12 +65,16 @@ private:
    std::unique_ptr<Inkscape::XML::SignalObserver> _observer;

    void _layerChanged(SPGroup *layer);
    void _queueUpdate();
    void _cancelUpdate();
    void _layerModified();
    void _selectLayer();
    void _hideLayer();
    void _lockLayer();
    void _layerChoose();
    Glib::ustring getThisCssClass() const;

    unsigned _tick_callback = 0;
};

} // namespace Inkscape::UI::Widget