mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Release 2023.06
This commit is contained in:
@@ -71,13 +71,15 @@ std::list<QMdiSubWindow*> RiuMdiArea::subWindowListSortedByPosition()
|
||||
|
||||
// Sort of list so we first sort by window position but retain activation order
|
||||
// for windows with the same position
|
||||
windowList.sort( [this]( QMdiSubWindow* lhs, QMdiSubWindow* rhs ) {
|
||||
if ( lhs->frameGeometry().topLeft().rx() == rhs->frameGeometry().topLeft().rx() )
|
||||
windowList.sort(
|
||||
[]( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
|
||||
{
|
||||
return lhs->frameGeometry().topLeft().ry() < rhs->frameGeometry().topLeft().ry();
|
||||
}
|
||||
return lhs->frameGeometry().topLeft().rx() < rhs->frameGeometry().topLeft().rx();
|
||||
} );
|
||||
if ( lhs->frameGeometry().topLeft().rx() == rhs->frameGeometry().topLeft().rx() )
|
||||
{
|
||||
return lhs->frameGeometry().topLeft().ry() < rhs->frameGeometry().topLeft().ry();
|
||||
}
|
||||
return lhs->frameGeometry().topLeft().rx() < rhs->frameGeometry().topLeft().rx();
|
||||
} );
|
||||
return windowList;
|
||||
}
|
||||
|
||||
@@ -92,13 +94,15 @@ std::list<QMdiSubWindow*> RiuMdiArea::subWindowListSortedByVerticalPosition()
|
||||
windowList.push_back( subWindow );
|
||||
}
|
||||
|
||||
windowList.sort( [this]( QMdiSubWindow* lhs, QMdiSubWindow* rhs ) {
|
||||
if ( lhs->frameGeometry().topLeft().ry() == rhs->frameGeometry().topLeft().ry() )
|
||||
windowList.sort(
|
||||
[]( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
|
||||
{
|
||||
return lhs->frameGeometry().topLeft().rx() < rhs->frameGeometry().topLeft().rx();
|
||||
}
|
||||
return lhs->frameGeometry().topLeft().ry() < rhs->frameGeometry().topLeft().ry();
|
||||
} );
|
||||
if ( lhs->frameGeometry().topLeft().ry() == rhs->frameGeometry().topLeft().ry() )
|
||||
{
|
||||
return lhs->frameGeometry().topLeft().rx() < rhs->frameGeometry().topLeft().rx();
|
||||
}
|
||||
return lhs->frameGeometry().topLeft().ry() < rhs->frameGeometry().topLeft().ry();
|
||||
} );
|
||||
|
||||
return windowList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user