diff --git a/logPlus/mainwindow.cpp b/logPlus/mainwindow.cpp index d78bf79..26f7510 100644 --- a/logPlus/mainwindow.cpp +++ b/logPlus/mainwindow.cpp @@ -228,6 +228,8 @@ void MainWindow::initTitleBar() m_dataMenu->addAction(QIcon( ::GetImagePath() + "wellog.png"), tr("&数据导入"), this, SLOT(s_ImportSingleWellLogData())); // QMenu* m_analyzeToolMenu = this->menuBar()->addMenu(tr("分析工具(&W)")); + m_analyzeToolMenu->addAction(QIcon( ::GetImagePath() + "outcurves.png"), tr("&数据导出"), this, SLOT(s_OutWellLogRound())); + m_analyzeToolMenu->addAction(QIcon( ::GetImagePath() + "wellsectionwindow.png"), tr("&可视解释"), this, SLOT(s_showView())); // QMenu* m_resultMenu = this->menuBar()->addMenu(tr("成果输出(&R)")); m_resultMenu->addAction(QIcon( ::GetImagePath() + "icon/SaveAsPicture.png"), tr("&导出长图"), this, SLOT(s_SaveAsPicture())); diff --git a/logPlus/qtprojectwidgets.cpp b/logPlus/qtprojectwidgets.cpp index c64aa1f..a0d864a 100644 --- a/logPlus/qtprojectwidgets.cpp +++ b/logPlus/qtprojectwidgets.cpp @@ -1980,7 +1980,8 @@ void QtProjectWidgets::onOutWellLogRound() { QStringList namelist;//=GetSelWellRound(); QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin(); - if (wellItem) + int nSelSize = ui->treeWidget->selectedItems().size();// 防止没有选中时崩溃 + if (wellItem && nSelSize>0) { QString strTreeTag = wellItem->data(0, Qt::UserRole).toString(); if (strTreeTag == "wellname") //井名