Skip to content

Commit 2a2392b

Browse files
Andrii BoichukAndrii Boichuk
authored andcommitted
Fix setCurrentPosition command
1 parent 0651880 commit 2a2392b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/webdriver/extension_qt/quick2_view_executor.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -985,14 +985,7 @@ void Quick2ViewCmdExecutor::SetPlayingPosition(const ElementId &element, double
985985
if (NULL == pItem)
986986
return;
987987

988-
989-
double currentPosition = 0;
990-
GetPlayingPosition(element, &currentPosition, error);
991-
if(*error)
992-
return;
993-
994-
int positionOffset = (int)((position - currentPosition) * 1000);
995-
QVariant var(positionOffset);
988+
QVariant var((int)((position) * 1000));
996989
bool isMethodCalled = QMetaObject::invokeMethod(pItem, "seek",
997990
Q_ARG(QVariant, var));
998991

0 commit comments

Comments
 (0)