Skip to content
Snippets Groups Projects
Commit e16cdec3 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix

parent fbc17ef2
Branches
Tags
No related merge requests found
...@@ -1034,8 +1034,10 @@ static void view_group_cb(Fl_Widget *w, void *data) ...@@ -1034,8 +1034,10 @@ static void view_group_cb(Fl_Widget *w, void *data)
{ {
if(!data) return; if(!data) return;
std::string group((char*)data); std::string group((char*)data);
if(group.front() == '/') group = group.substr(1); while(group.size() && group[0] == '/')
if(group.back() == '/') group.pop_back(); group = group.substr(1);
while(group.size() && group[group.size() - 1] == '/')
group = group.substr(0, group.size() - 1);
for(unsigned int i = 0; i < PView::list.size(); i++){ for(unsigned int i = 0; i < PView::list.size(); i++){
PViewOptions *opt = PView::list[i]->getOptions(); PViewOptions *opt = PView::list[i]->getOptions();
if(opt->group.find(group) == 0) if(opt->group.find(group) == 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment