Commit 7835b6b2 authored by Ralf Habacker's avatar Ralf Habacker

Fix not working "Shift"+"Key_Right" and "Shift"+"Key_Left" shortcut in non...

Fix not working "Shift"+"Key_Right" and "Shift"+"Key_Left" shortcut in non tabbed diagram mode (CID 71474).

This issue has been initial reported by coverity CID 71474: Logically dead code (DEADCODE)

Execution cannot reach this statement: this->setCurrentView(currVi....)
parent f7c8ccdf
......@@ -3101,7 +3101,7 @@ void UMLApp::slotTabChanged(QWidget* tab)
void UMLApp::slotChangeTabLeft()
{
//DEBUG(DBG_SRC) << "currentIndex = " << m_tabWidget->currentIndex() << " of " << m_tabWidget->count();
if (m_tabWidget) {
if (Settings::optionState().generalState.tabdiagrams && m_tabWidget) {
m_tabWidget->setCurrentIndex(m_tabWidget->currentIndex() - 1);
return;
}
......@@ -3131,7 +3131,7 @@ void UMLApp::slotChangeTabLeft()
void UMLApp::slotChangeTabRight()
{
//DEBUG(DBG_SRC) << "currentIndex = " << m_tabWidget->currentIndex() << " of " << m_tabWidget->count();
if (m_tabWidget) {
if (Settings::optionState().generalState.tabdiagrams && m_tabWidget) {
m_tabWidget->setCurrentIndex(m_tabWidget->currentIndex() + 1);
return;
}
......@@ -3143,16 +3143,12 @@ void UMLApp::slotChangeTabRight()
return;
}
UMLView* nextView = NULL;
if (viewIndex!= views.count()) {
views.begin()[viewIndex + 1];
if (viewIndex < views.count()-1) {
nextView = views.begin()[viewIndex + 1];
setCurrentView(nextView);
}
if ((currView = nextView) != NULL) {
setCurrentView(currView);
}
else {
else
setCurrentView(views.first());
}
}
/* for debugging only
......
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