Skip to content

Commit

Permalink
- Breakpoints can only be added to saved files.
Browse files Browse the repository at this point in the history
- Updated the translation files.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22013 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Aug 26, 2014
1 parent bf0506a commit dad861c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OMEdit/OMEditGUI/Editors/BaseEditor.cpp
Expand Up @@ -165,6 +165,12 @@ void BaseEditor::lineNumberAreaMouseEvent(QMouseEvent *event)
}
else if (event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonDblClick)
{
/* Do not allow breakpoints if file is not saved. */
if (!mpModelWidget->getLibraryTreeNode()->isSaved()) {
InfoBar *pInfoBar = mpModelWidget->getModelWidgetContainer()->getMainWindow()->getInfoBar();
pInfoBar->showMessage(tr("<b>Information: </b>Breakpoints are only allowed on saved classes."));
return;
}
QString fileName = mpModelWidget->getLibraryTreeNode()->getFileName();
int lineNumber = cursor.blockNumber() + 1;
if (event->button() == Qt::LeftButton)
Expand Down

0 comments on commit dad861c

Please sign in to comment.