Commit 0d1ef2b4 authored by Jan Möbius's avatar Jan Möbius

Fixed bug where multiview layout box has not been updated correctly



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15019 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 01f39639
...@@ -1007,26 +1007,7 @@ void Core::multiViewMode( int _mode ) { ...@@ -1007,26 +1007,7 @@ void Core::multiViewMode( int _mode ) {
if ( !OpenFlipper::Options::gui() || !OpenFlipperSettings().value("Core/Gui/glViewer/useMultipleViewers",true).toBool() ) if ( !OpenFlipper::Options::gui() || !OpenFlipperSettings().value("Core/Gui/glViewer/useMultipleViewers",true).toBool() )
return; return;
switch (_mode) coreWidget_->setViewerLayout(_mode);
{
case 0:
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::SingleView);
PluginFunctions::setActiveExaminer(0);
break;
case 1:
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::DoubleView);
break;
case 2:
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::Grid);
break;
case 3:
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::HSplit);
break;
default:
emit log(LOGERR,tr("Requested illegal multiview mode!"));
break;
}
} }
......
...@@ -940,27 +940,30 @@ CoreWidget::setViewerLayout(int _idx) { ...@@ -940,27 +940,30 @@ CoreWidget::setViewerLayout(int _idx) {
if ( OpenFlipperSettings().value("Core/Gui/glViewer/useMultipleViewers",true).toBool() ) { if ( OpenFlipperSettings().value("Core/Gui/glViewer/useMultipleViewers",true).toBool() ) {
switch (_idx) { switch (_idx) {
case 0: case 0:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ()); baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::SingleView); baseLayout_->setMode(QtMultiViewLayout::SingleView);
break; break;
case 1: case 1:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ()); baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::DoubleView); baseLayout_->setMode(QtMultiViewLayout::DoubleView);
break; break;
case 2: case 2:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ()); baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::Grid); baseLayout_->setMode(QtMultiViewLayout::Grid);
break; break;
case 3: case 3:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ()); baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::HSplit); baseLayout_->setMode(QtMultiViewLayout::HSplit);
break; break;
} default:
emit log(LOGERR,tr("Requested illegal multiview mode!"));
}
viewerLayoutBox_->setCurrentIndex(_idx); viewerLayoutBox_->setCurrentIndex(_idx);
} }
} }
void void
......
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