Skip to content

Commit

Permalink
- Library right click issue solved.
Browse files Browse the repository at this point in the history
- UserManual opening code is updated again (a test for MAC).

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7545 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Dec 22, 2010
1 parent 6295b40 commit 8c7359c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions OMEdit/OMEditGUI/LibraryWidget.cpp
Expand Up @@ -704,6 +704,9 @@ void LibraryTree::loadingLibraryComponent(LibraryTreeNode *treeNode, QString cla

void LibraryTree::treeItemPressed(QTreeWidgetItem *item)
{
if (qApp->mouseButtons() != Qt::LeftButton)
return;

if (!item)
return;

Expand Down
12 changes: 8 additions & 4 deletions OMEdit/OMEditGUI/mainwindow.cpp
Expand Up @@ -605,11 +605,15 @@ void MainWindow::checkModel()

void MainWindow::openUserManual()
{
// QString userManualPath;
// userManualPath = >QString(Helper::OpenModelicaHome.replace("\\", "/"))
// .append("/share/doc/omedit/OMEdit-UserManual.pdf");
QUrl userManualPath (QString("file:///").append(Helper::OpenModelicaHome.replace("\\", "/"))
QUrl userManualPath;
// since in MAC OS X the url adds extra quotes to it, so we need to handle it differently.
#ifdef Q_OS_MAC
userManualPath = QUrl(QString("file:///").append(QString(getenv("OPENMODELICAHOME")))
.append("/share/doc/omedit/OMEdit-UserManual.pdf"));
#else
userManualPath = QUrl(QString("file:///").append(Helper::OpenModelicaHome.replace("\\", "/"))
.append("/share/doc/omedit/OMEdit-UserManual.pdf"));
#endif
QDesktopServices::openUrl(userManualPath);
}

Expand Down

0 comments on commit 8c7359c

Please sign in to comment.