Skip to content

Commit

Permalink
タッチした箇所とメニューの出現座標が合ってなかったのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
eighttails committed Dec 17, 2023
1 parent 58f4cd6 commit 9d04650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Qt/renderview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bool RenderView::event(QEvent *event)
if(QTouchEvent* tEvent = dynamic_cast<QTouchEvent*>(event)){
auto state = tEvent->points()[0].state();
if (state == QEventPoint::Pressed){
auto point = tEvent->points()[0].position().toPoint();
auto point = tEvent->points()[0].globalPosition().toPoint();
QGraphicsItem* item = scene()->itemAt(mapToScene(point), transform());
// タップしたアイテムが原点にある場合、メイン画面とみなしてメニューを出す
if(item && item->pos() == QPoint(0, 0)){
Expand Down

0 comments on commit 9d04650

Please sign in to comment.