pull/2278/head
dmitry 2023-07-04 01:24:34 +03:00
parent c9b963e82b
commit de626dcbbc
2 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,6 @@
#include <gtkmm/button.h> #include <gtkmm/button.h>
#include <gtkmm/label.h> #include <gtkmm/label.h>
#include <memory> #include <memory>
#include "AModule.hpp" #include "AModule.hpp"

View File

@ -100,17 +100,16 @@ void Workspaces::create_workspace(int id) {
} }
void Workspaces::remove_workspace(int id) { void Workspaces::remove_workspace(int id) {
auto workspace = std::find_if( auto workspace = std::find_if(workspaces_.begin(), workspaces_.end(),
workspaces_.begin(), workspaces_.end(), [&](std::unique_ptr<Workspace> &x) { return x->id() == id; });
[&](std::unique_ptr<Workspace> &x) { return x->id() == id; });
if (workspace == workspaces_.end()) { if (workspace == workspaces_.end()) {
spdlog::warn("Can't find workspace with id {}", workspace->get()->id()); spdlog::warn("Can't find workspace with id {}", workspace->get()->id());
return; return;
} }
box_.remove(workspace->get()->button()); box_.remove(workspace->get()->button());
workspaces_.erase(workspace); workspaces_.erase(workspace);
} }
void Workspaces::init() { void Workspaces::init() {