diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp index 4ff74b3b..2dfcd3ec 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp @@ -2409,6 +2409,9 @@ void TasEditorWindow::updateToolTips(void) turboSeekCbox->setToolTip( tr("Uncheck when you need to watch seeking in slow motion") ); autoRestoreCbox->setToolTip( tr("Whenever you change Input above Playback cursor, the cursor returns to where it was before the change") ); + selectionLbl->setToolTip( tr("Current size of Selection") ); + clipboardLbl->setToolTip( tr("Current size of Input in the Clipboard") ); + prevMkrBtn->setToolTip( tr("Send Selection to previous Marker (mouse: Ctrl+Wheel up) (hotkey: Ctrl+PageUp)") ); nextMkrBtn->setToolTip( tr("Send Selection to next Marker (mouse: Ctrl+Wheel up) (hotkey: Ctrl+PageDown)") ); similarBtn->setToolTip( tr("Auto-search for Marker Note") ); @@ -2440,6 +2443,9 @@ void TasEditorWindow::updateToolTips(void) turboSeekCbox->setToolTip( tr("") ); autoRestoreCbox->setToolTip( tr("") ); + selectionLbl->setToolTip( tr("") ); + clipboardLbl->setToolTip( tr("") ); + prevMkrBtn->setToolTip( tr("") ); nextMkrBtn->setToolTip( tr("") ); similarBtn->setToolTip( tr("") ); diff --git a/src/drivers/Qt/TasEditor/bookmarks.cpp b/src/drivers/Qt/TasEditor/bookmarks.cpp index ad8e8c5f..949660b8 100644 --- a/src/drivers/Qt/TasEditor/bookmarks.cpp +++ b/src/drivers/Qt/TasEditor/bookmarks.cpp @@ -974,13 +974,17 @@ bool BOOKMARKS::event(QEvent *event) item = (row_under_mouse + 1) % TOTAL_BOOKMARKS; item_valid = (item >= 0) && (item < TOTAL_BOOKMARKS); - if ( item_valid && bookmarks->bookmarksArray[item].notEmpty) + if ( item_valid && (column == BOOKMARKSLIST_COLUMN_TIME) && bookmarks->bookmarksArray[item].notEmpty) { static_cast(fceuCustomToolTipShow( helpEvent, new bookmarkPreviewPopup(item, this) )); //QToolTip::showText(helpEvent->globalPos(), tr(stmp), this ); QToolTip::hideText(); event->ignore(); } + else if ( taseditorConfig && taseditorConfig->tooltipsEnabled ) + { + QToolTip::showText(helpEvent->globalPos(), tr("Right click = set Bookmark, Left click = jump to Bookmark or load Branch"), this ); + } return true; } diff --git a/src/drivers/Qt/TasEditor/branches.cpp b/src/drivers/Qt/TasEditor/branches.cpp index 1c575668..3a452b31 100644 --- a/src/drivers/Qt/TasEditor/branches.cpp +++ b/src/drivers/Qt/TasEditor/branches.cpp @@ -23,6 +23,7 @@ Branches - Manager of Branches #include #include +#include #include #include "utils/xstring.h" @@ -635,6 +636,33 @@ void BRANCHES::mouseMoveEvent(QMouseEvent * event) } +bool BRANCHES::event(QEvent *event) +{ + if (event->type() == QEvent::ToolTip) + { + int item, item_valid; + QHelpEvent *helpEvent = static_cast(event); + + item = findItemUnderMouse( helpEvent->pos().x(), helpEvent->pos().y() ); + + item_valid = (item >= 0) && (item < TOTAL_BOOKMARKS); + + if ( item_valid && bookmarks->bookmarksArray[item].notEmpty) + { + static_cast(fceuCustomToolTipShow( helpEvent, new bookmarkPreviewPopup(item, this) )); + //QToolTip::showText(helpEvent->globalPos(), tr(stmp), this ); + QToolTip::hideText(); + event->ignore(); + } + else if ( taseditorConfig && taseditorConfig->tooltipsEnabled ) + { + QToolTip::showText(helpEvent->globalPos(), tr("Right click = set Bookmark, single Left click = jump to Bookmark, double Left click = load Branch") ); + } + return true; + } + return QWidget::event(event); +} + void BRANCHES::paintEvent(QPaintEvent *event) { int x,y; diff --git a/src/drivers/Qt/TasEditor/branches.h b/src/drivers/Qt/TasEditor/branches.h index 65646db9..33cbf4ae 100644 --- a/src/drivers/Qt/TasEditor/branches.h +++ b/src/drivers/Qt/TasEditor/branches.h @@ -145,6 +145,7 @@ protected: void mousePressEvent(QMouseEvent * event); void mouseReleaseEvent(QMouseEvent * event); void mouseMoveEvent(QMouseEvent * event); + bool event(QEvent *event); private: void calcFontData(void);