mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 08:09:39 +00:00
Merge pull request #1132 from oleg-alexandrov/master
Update menus only after the viewers update to get the geometry right
This commit is contained in:
commit
3e3d461d39
@ -669,6 +669,8 @@ void GLArea::paintEvent(QPaintEvent* /*event*/)
|
||||
glFlush();
|
||||
glFinish();
|
||||
painter.endNativePainting();
|
||||
|
||||
emit currentViewerRefreshed();
|
||||
}
|
||||
|
||||
void GLArea::displayMatrix(QPainter *painter, QRect areaRect)
|
||||
|
||||
@ -279,6 +279,7 @@ signals:
|
||||
void glareaClosed(); //someone has closed the glarea
|
||||
void insertRenderingDataForNewlyGeneratedMesh(int);
|
||||
void currentViewerChanged(int currentId);
|
||||
void currentViewerRefreshed();
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
@ -475,8 +475,13 @@ void MainWindow::setUnsplit()
|
||||
assert(mvc->viewerCounter() >1);
|
||||
|
||||
mvc->removeView(mvc->currentView()->getId());
|
||||
|
||||
updateMenus();
|
||||
|
||||
// After the view is removed and the remaining viewers
|
||||
// are refreshed to fill the freed area, the geometry
|
||||
// of these viewers becomes known, and then the menus
|
||||
// can be updated correctly.
|
||||
QObject::connect(mvc->currentView(), SIGNAL(currentViewerRefreshed()),
|
||||
this, SLOT(updateMenus()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user