Fix Welcome dialog stacking up when run more than once (eab9c6d5) · Commits · René de Hesselle / inkscape · GitLab
Wen-Wei Kao
·
2026-03-25
·
via inkscape:windows_ci_14x commits
| Original line number |
Diff line number |
Diff line |
|
@@ -1135,10 +1135,12 @@ InkscapeApplication::on_activate() |
|
|
if (!_start_screen) {
|
|
|
_start_screen = std::make_unique<Inkscape::UI::Dialog::StartScreen>();
|
|
|
}
|
|
|
if (!_start_screen->is_welcome_instantiated()) {
|
|
|
_start_screen->setup_welcome();
|
|
|
_start_screen->run(); // Blocks until document selected
|
|
|
document = _start_screen->get_document();
|
|
|
startup_close();
|
|
|
}
|
|
|
if (!document) {
|
|
|
return;
|
|
|
}
|
|
|
| Original line number |
Diff line number |
Diff line |
|
@@ -199,7 +199,7 @@ void StartScreen::show_now() |
|
|
|
|
|
void StartScreen::setup_welcome()
|
|
|
{
|
|
|
_welcome = true;
|
|
|
_welcome_instantiated = true;
|
|
|
|
|
|
auto prefs = Inkscape::Preferences::get();
|
|
|
|
|
@@ -295,13 +295,18 @@ void StartScreen::setup_welcome() |
|
|
show();
|
|
|
}
|
|
|
|
|
|
bool StartScreen::is_welcome_instantiated()
|
|
|
{
|
|
|
return _welcome_instantiated;
|
|
|
}
|
|
|
|
|
|
StartScreen::~StartScreen()
|
|
|
{
|
|
|
// These are "owned" by builder... don't delete them!
|
|
|
banners.get_parent()->remove(banners);
|
|
|
messages.get_parent()->remove(messages);
|
|
|
|
|
|
if (_welcome) {
|
|
|
if (_welcome_instantiated) {
|
|
|
auto tabs = &get_widget<Gtk::Notebook>(build_welcome, "tabs");
|
|
|
tabs->get_parent()->remove(*tabs);
|
|
|
}
|
|
|
| Original line number |
Diff line number |
Diff line |
|
@@ -52,6 +52,7 @@ public: |
|
|
|
|
|
void show_now();
|
|
|
void setup_welcome();
|
|
|
bool is_welcome_instantiated();
|
|
|
|
|
|
protected:
|
|
|
void on_response(int response_id) override;
|
|
@@ -92,7 +93,7 @@ private: |
|
|
Gtk::TreeView *recentfiles = nullptr;
|
|
|
|
|
|
SPDocument* _document = nullptr;
|
|
|
bool _welcome = false;
|
|
|
bool _welcome_instantiated = false;
|
|
|
};
|
|
|
|
|
|
} // namespace Dialog
|
|
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。