Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/OpenModelica/OMEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
alash325 committed Jun 10, 2015
2 parents 305ac7d + 3c417a6 commit 38edcd2
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -418,7 +418,7 @@ bool GraphicsView::addComponent(QString className, QPointF position)
// get the model defaultComponentName
QString defaultName = pMainWindow->getOMCProxy()->getDefaultComponentName(className);
if (defaultName.isEmpty()) {
name = getUniqueComponentName(name.toLower());
name = getUniqueComponentName(StringHandler::toCamelCase(name));
} else {
if (checkComponentName(defaultName)) {
name = defaultName;
Expand Down
14 changes: 7 additions & 7 deletions OMEdit/OMEditGUI/OMEditGUI.pro
Expand Up @@ -123,9 +123,9 @@ SOURCES += main.cpp \
Simulation/SimulationOutputHandler.cpp \
TLM/FetchInterfaceDataDialog.cpp \
TLM/FetchInterfaceDataThread.cpp \
Simulation/TLMCoSimulationDialog.cpp \
Simulation/TLMCoSimulationOutputWidget.cpp \
Simulation/TLMCoSimulationThread.cpp \
TLM/TLMCoSimulationDialog.cpp \
TLM/TLMCoSimulationOutputWidget.cpp \
TLM/TLMCoSimulationThread.cpp \
FMI/ImportFMUDialog.cpp \
Plotting/VariablesWidget.cpp \
Options/NotificationsDialog.cpp \
Expand Down Expand Up @@ -187,10 +187,10 @@ HEADERS += Util/Helper.h \
Simulation/SimulationOutputHandler.h \
TLM/FetchInterfaceDataDialog.h \
TLM/FetchInterfaceDataThread.h \
Simulation/TLMCoSimulationOptions.h \
Simulation/TLMCoSimulationDialog.h \
Simulation/TLMCoSimulationOutputWidget.h \
Simulation/TLMCoSimulationThread.h \
TLM/TLMCoSimulationOptions.h \
TLM/TLMCoSimulationDialog.h \
TLM/TLMCoSimulationOutputWidget.h \
TLM/TLMCoSimulationThread.h \
FMI/ImportFMUDialog.h \
Plotting/VariablesWidget.h \
Options/NotificationsDialog.h \
Expand Down
13 changes: 13 additions & 0 deletions OMEdit/OMEditGUI/Util/StringHandler.cpp
Expand Up @@ -1482,3 +1482,16 @@ QString StringHandler::makeClassNameRelative(QString draggedClassName, QString d
return draggedClassName;
}
}

/*!
* \brief StringHandler::toCamelCase
* Converts the string to camel case.
* \param str
* \return the string converted to camel case.
*/
QString StringHandler::toCamelCase(QString str)
{
QString s = str;
s[0] = s[0].toLower();
return s;
}
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Util/StringHandler.h
Expand Up @@ -148,6 +148,7 @@ class StringHandler : public QObject
static QString getSimulationMessageTypeString(StringHandler::SimulationMessageType type);
static QColor getSimulationMessageTypeColor(StringHandler::SimulationMessageType type);
static QString makeClassNameRelative(QString draggedClassName, QString droppedClassName);
static QString toCamelCase(QString str);
protected:
static QString mLastOpenDir;
};
Expand Down

0 comments on commit 38edcd2

Please sign in to comment.