Bug fix for bookmark preview popup window placement. Now is always placed left of scrollable area viewport.

This commit is contained in:
mjbudd77 2021-12-29 19:52:54 -05:00
parent d55d2c3f8a
commit 96c1f588e4
2 changed files with 8 additions and 1 deletions

View File

@ -1410,6 +1410,11 @@ void TasEditorWindow::updateHistoryItems(void)
histTree->viewport()->update(); histTree->viewport()->update();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
QPoint TasEditorWindow::getPreviewPopupCoordinates(void)
{
return bkmkBrnchStack->mapToGlobal(QPoint(0,0));
}
//----------------------------------------------------------------------------
int TasEditorWindow::initModules(void) int TasEditorWindow::initModules(void)
{ {
// init modules // init modules
@ -6542,7 +6547,7 @@ bookmarkPreviewPopup::bookmarkPreviewPopup( int index, QWidget *parent )
free( pixBuf ); pixBuf = NULL; free( pixBuf ); pixBuf = NULL;
} }
pos = parent->mapToGlobal(QPoint(0,0)); pos = tasWin->getPreviewPopupCoordinates();
pos.setX( pos.x() - 300 ); pos.setX( pos.x() - 300 );

View File

@ -388,6 +388,8 @@ class TasEditorWindow : public QDialog
bool handleInputColumnSet(int joy, int button); bool handleInputColumnSet(int joy, int button);
bool handleInputColumnSetUsingPattern(int joy, int button); bool handleInputColumnSetUsingPattern(int joy, int button);
QPoint getPreviewPopupCoordinates(void);
protected: protected:
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event);