Commit 94d0b31a authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Refactor default cursor handling of class WorkToolBar into separete method defaultCursor().

It turns out that Umbrello do not use the arrow from umbrello icons for the default cursor.

This commit is a preparation for the tool bar icons shortcut support.

CCBUG:124804
parent 4f9c87d8
......@@ -100,6 +100,7 @@ public:
DocWindow * docWindow() const;
QListWidget *logWindow() const;
QCursor defaultCursor();
void setModified(bool _m);
......
......@@ -246,6 +246,14 @@ QCursor WorkToolBar::currentCursor()
return m_ToolButtons[m_CurrentButtonID].Cursor;
}
/**
* Returns the default cursor
*/
QCursor WorkToolBar::defaultCursor()
{
return Qt::ArrowCursor;
}
void WorkToolBar::slotResetToolBar()
{
if (m_CurrentButtonID == tbb_Undefined)
......@@ -257,12 +265,9 @@ void WorkToolBar::slotResetToolBar()
m_actions[m_CurrentButtonID]->toggle();
emit sigButtonChanged(m_CurrentButtonID);
QCursor curs;
curs.setShape(Qt::ArrowCursor);
UMLView* view = UMLApp::app()->currentView();
if (view != NULL) {
view->setCursor(curs);
view->setCursor(defaultCursor());
}
}
......
......@@ -149,6 +149,7 @@ private:
void loadPixmaps();
QCursor currentCursor();
QCursor defaultCursor();
QAction* insertHotBtn(ToolBar_Buttons tbb);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment