mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
using rasterLayerMenu instead of a new one.
This commit is contained in:
parent
ff216153fc
commit
4ba6e3a014
@ -45,14 +45,6 @@ LayerDialog::LayerDialog(QWidget *parent ) : QDockWidget(parent)
|
||||
LayerDialog::ui->setupUi(this);
|
||||
mw=qobject_cast<MainWindow *>(parent);
|
||||
|
||||
rasterMenu = new QMenu(this);
|
||||
addNewRasterAct = new QAction(tr("Add New Raster"),this);
|
||||
rasterMenu->addAction(addNewRasterAct);
|
||||
connect(addNewRasterAct,SIGNAL(triggered()),mw,SLOT(importRaster()));
|
||||
removeCurrentRasterAct = new QAction(tr("Remove Current Raster"),this);
|
||||
rasterMenu->addAction(removeCurrentRasterAct);
|
||||
connect(removeCurrentRasterAct,SIGNAL(triggered()),mw,SLOT(delCurrentRaster()));
|
||||
|
||||
|
||||
tagMenu = new QMenu(this);
|
||||
removeTagAct = new QAction(tr("&Remove Tag"),this);
|
||||
@ -205,7 +197,7 @@ void LayerDialog::showContextMenu(const QPoint& pos)
|
||||
MainWindow* mainwindow = dynamic_cast<MainWindow*>(widget);
|
||||
if (mainwindow)
|
||||
{
|
||||
mainwindow->layerMenu()->popup(ui->meshTreeWidget->mapToGlobal(pos));
|
||||
mainwindow->meshLayerMenu()->popup(ui->meshTreeWidget->mapToGlobal(pos));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -236,8 +228,16 @@ void LayerDialog::showContextMenu(const QPoint& pos)
|
||||
if (rItem->r)
|
||||
{
|
||||
mw->meshDoc()->setCurrentRaster(rItem->r->id());
|
||||
rasterMenu->popup(ui->rasterTreeWidget->mapToGlobal(pos));
|
||||
return;
|
||||
|
||||
foreach (QWidget *widget, QApplication::topLevelWidgets())
|
||||
{
|
||||
MainWindow* mainwindow = dynamic_cast<MainWindow*>(widget);
|
||||
if (mainwindow)
|
||||
{
|
||||
mainwindow->rasterLayerMenu()->popup(ui->rasterTreeWidget->mapToGlobal(pos));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +292,8 @@ public:
|
||||
static QStatusBar *_qsb=0;
|
||||
return _qsb;
|
||||
}
|
||||
QMenu* layerMenu() { return filterMenuMeshLayer; }
|
||||
QMenu* meshLayerMenu() { return filterMenuMeshLayer; }
|
||||
QMenu* rasterLayerMenu() { return filterMenuRasterLayer; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user