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

remove ad-hoc New View button (use Plugin(NewView) instead)

parent a18c71c1
No related branches found
No related tags found
No related merge requests found
......@@ -211,27 +211,6 @@ static void plugin_run_cb(Fl_Widget *w, void *data)
drawContext::global()->draw();
}
static void plugin_create_new_view_cb(Fl_Widget *w, void *data)
{
if(GModel::current()->getMeshStatus() < 1){
Msg::Error("No mesh available to create the view: please mesh your model!");
return;
}
std::map<int, std::vector<double> > d;
std::vector<GEntity*> entities;
GModel::current()->getEntities(entities);
for(unsigned int i = 0; i < entities.size(); i++){
for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++){
MVertex *v = entities[i]->mesh_vertices[j];
d[v->getNum()].push_back(0.);
}
}
PView *view = new PView("New view", "NodeData", GModel::current(), d);
view->setChanged(true);
FlGui::instance()->updateViews();
drawContext::global()->draw();
}
void pluginWindow::_createDialogBox(GMSH_Plugin *p, int x, int y,
int width, int height)
{
......@@ -242,7 +221,6 @@ void pluginWindow::_createDialogBox(GMSH_Plugin *p, int x, int y,
title->labelfont(FL_BOLD);
title->labelsize(FL_NORMAL_SIZE + 3);
title->align(FL_ALIGN_INSIDE);
Fl_Box *help = new Fl_Box
(x, y + BH, width, BH + WB, strdup(p->getShortHelp().c_str()));
help->align(FL_ALIGN_WRAP | FL_ALIGN_CLIP | FL_ALIGN_TOP | FL_ALIGN_INSIDE);
......@@ -337,16 +315,11 @@ pluginWindow::pluginWindow(int deltaFontSize)
browser->box(FL_FLAT_BOX);
browser->has_scrollbar(Fl_Browser_::VERTICAL);
view_browser = new Fl_Multi_Browser(L1, 0, L2, height - BH);
view_browser = new Fl_Multi_Browser(L1, 0, L2, height);
view_browser->has_scrollbar(Fl_Browser_::VERTICAL);
view_browser->callback(plugin_browser_cb);
view_browser->box(FL_FLAT_BOX);
Fl_Button *b = new Fl_Button(L1, height - BH, L2, BH, "New view");
b->callback(plugin_create_new_view_cb);
b->tooltip("Create new post-processing dataset based on current mesh");
b->box(FL_FLAT_BOX);
for(std::map<std::string, GMSH_Plugin*>::iterator it = PluginManager::
instance()->begin(); it != PluginManager::instance()->end(); ++it) {
GMSH_Plugin *p = it->second;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment