diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp index 027f11c1..dd2e57d9 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp @@ -1269,10 +1269,12 @@ void TasEditorWindow::updateCheckedItems(void) //---------------------------------------------------------------------------- void TasEditorWindow::updateHistoryItems(void) { - int i; + int i, cursorPos; QTreeWidgetItem *item; const char *txt; + cursorPos = history.getCursorPos(); + for (i=0; iaddTopLevelItem(item); - histTree->setCurrentItem(item); + //histTree->setCurrentItem(item); } if ( txt ) @@ -1294,9 +1296,13 @@ void TasEditorWindow::updateHistoryItems(void) { item->setText(0, tr(txt)); - histTree->setCurrentItem(item); + //histTree->setCurrentItem(item); } } + if ( cursorPos == i ) + { + histTree->setCurrentItem(item); + } } while ( (histTree->topLevelItemCount() > 0) && (history.getNumItems() < histTree->topLevelItemCount()) ) @@ -3086,6 +3092,7 @@ void QPianoRoll::finishDrag(void) //---------------------------------------------------------------------------- void QPianoRoll::paintEvent(QPaintEvent *event) { + fceuCriticalSection emuLock; int x, y, row, nrow, lineNum; QPainter painter(this); QColor white(255,255,255), black(0,0,0), blkColor; diff --git a/src/drivers/Qt/TasEditor/history.h b/src/drivers/Qt/TasEditor/history.h index 72365ea8..ddbbb584 100644 --- a/src/drivers/Qt/TasEditor/history.h +++ b/src/drivers/Qt/TasEditor/history.h @@ -128,8 +128,6 @@ public: int getUndoHint(); char* getItemDesc(int pos); - //void getDispInfo(NMLVDISPINFO* nmlvDispInfo); - //LONG handleCustomDraw(NMLVCUSTOMDRAW* msg); void handleSingleClick(int rowIndex); void redrawList(); @@ -138,8 +136,7 @@ public: bool isCursorOverHistoryList(); int getNumItems(void){ return historyTotalItems; }; - - //HWND hwndHistoryList; + int getCursorPos(void){ return historyCursorPos; }; private: int jumpInTime(int newPos);