Skip to content

Commit 2463e5c

Browse files
committed
IanniX 0.9.12
- bug with multiple instantaneous trigs of one trigger
1 parent 5616faa commit 2463e5c

File tree

8 files changed

+14
-17
lines changed

8 files changed

+14
-17
lines changed

.DS_Store

0 Bytes
Binary file not shown.

IanniX.pro.user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE QtCreatorProject>
3-
<!-- Written by QtCreator 2.7.1, 2013-08-13T08:20:34. -->
3+
<!-- Written by QtCreator 2.7.1, 2013-08-13T13:10:17. -->
44
<qtcreator>
55
<data>
66
<variable>ProjectExplorer.Project.ActiveTarget</variable>

Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@
7272
<key>CFBundleSignature</key>
7373
<string>INNX</string>
7474
<key>CFBundleVersion</key>
75-
<string>0.9.11</string>
75+
<string>0.9.12</string>
7676
</dict>
7777
</plist>

iannixapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
3939
//iannixApp.installTranslator(&translator);
4040

4141
QString appName = "IanniX ";
42-
QString appVersion = "0.9.11";
42+
QString appVersion = "0.9.12";
4343

4444
#ifdef Q_OS_MAC
4545
appName += "Mac";

icon.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
IDI_ICON1 ICON DISCARDABLE "icon.ico"
22

33
#include <windows.h>
4-
#define VER_FILEVERSION 0,9,11,0
5-
#define VER_FILEVERSION_STR "0.9,11\0"
6-
#define VER_PRODUCTVERSION 0,9,11,0
7-
#define VER_PRODUCTVERSION_STR "0.9,11\0"
4+
#define VER_FILEVERSION 0,9,12,0
5+
#define VER_FILEVERSION_STR "0.9,12\0"
6+
#define VER_PRODUCTVERSION 0,9,12,0
7+
#define VER_PRODUCTVERSION_STR "0.9,12\0"
88
#define VER_COMPANYNAME_STR "IanniX Association"
99
#define VER_FILEDESCRIPTION_STR "IanniX"
1010
#define VER_INTERNALNAME_STR "IanniX"

objects/nxcursor.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ void NxCursor::trig(bool force) {
506506

507507
bool NxCursor::contains(NxTrigger *trigger) const {
508508
qint64 timestamp = QDateTime::currentMSecsSinceEpoch();
509-
if((previousPreviousCursorReliable) && (trigger->getActive()) && ((timestamp - trigger->lastTrigTime) > 10)) {
509+
if((previousPreviousCursorReliable) && (trigger->getActive()) && (!trigger->cursorTrigged)/* && ((timestamp - trigger->lastTrigTime) > 0)*/) {
510510
NxPoint centre1 = trigger->getPos() - NxPoint( (cursorPoly.at(0).x() + cursorPoly.at(1).x() + cursorPoly.at(2).x() + cursorPoly.at(3).x()) / 4.,
511511
(cursorPoly.at(0).y() + cursorPoly.at(1).y() + cursorPoly.at(2).y() + cursorPoly.at(3).y()) / 4.,
512512
(cursorPoly.at(0).z() + cursorPoly.at(1).z() + cursorPoly.at(2).z() + cursorPoly.at(3).z()) / 4.);
@@ -544,19 +544,17 @@ bool NxCursor::contains(NxTrigger *trigger) const {
544544
bool isInDepth = (qAbs(centre1.z()) <= depth/2.) && (qAbs(centre2.z()) <= depth/2.);
545545
bool isInside = ((centre1.x() >= 0) && (centre2.x() <= 0)) || ((centre1.x() <= 0) && (centre2.x() >= 0));
546546

547-
//qDebug("%d\t=\t%f\t%f", isInside, centre1.x(), centre2.x());
548-
549547
if(depth > 0) {
550-
//qDebug("%d %d %d", isInWidth, isInDepth, isInside);
551548
if(isInDepth && isInWidth && isInside) {
549+
qDebug("A > %f %d %d %d", timeLocal, isInDepth, isInWidth, isInside);
550+
qDebug("%d\t=\t%f\t%f => BY %d", isInside, centre1.x(), centre2.x(), trigger->cursorTrigged);
552551
trigger->lastTrigTime = timestamp;
553552
return true;
554553
}
555554
else
556555
return false;
557556
}
558557
else {
559-
//qDebug("%d %d", isInWidth, isInside);
560558
if(isInWidth && isInside) {
561559
trigger->lastTrigTime = timestamp;
562560
return true;

objects/nxtrigger.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,14 @@ void NxTrigger::paint() {
149149
}
150150

151151
void NxTrigger::trig(NxObject *cursor) {
152-
/*if((!cursor) || (!cursorTrigged)) {*/
153152
if(cursor) {
154153
colorTrigged = cursor->getCurrentColor();
155154
colorTrigged.setAlpha(255);
156155
}
157156
cursorTrigged = cursor;
158-
QTimer::singleShot(qMax(triggerOff*1000, (qreal)80), this, SLOT(trigEnd()));
159157
MessageManager::outgoingMessage(MessageManagerDestination(this, this, cursorTrigged));
160-
//}
158+
if(triggerOff > 0) QTimer::singleShot(triggerOff*1000, this, SLOT(trigEnd()));
159+
else trigEnd();
161160
}
162161
void NxTrigger::trigEnd() {
163162
if(triggerOff > 0) {
@@ -169,8 +168,8 @@ void NxTrigger::trigEnd() {
169168
sendMessage = true;
170169
}
171170
}
172-
cursorTrigged = 0;
173171
if(sendMessage)
174172
MessageManager::outgoingMessage(MessageManagerDestination(this, this, cursorTriggedTmp));
175173
}
174+
cursorTrigged = 0;
176175
}

objects/nxtrigger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class NxTrigger : public NxObject {
3737
private:
3838
qreal cacheSize;
3939
QString textureActive, textureInactive;
40-
NxObject *cursorTrigged;
4140
QColor colorTrigged;
4241
qreal triggerOff;
4342
static GLuint glListTrigger;
4443
public:
44+
NxObject *cursorTrigged;
4545
qint64 lastTrigTime;
4646
inline quint8 getType() const {
4747
return ObjectsTypeTrigger;

0 commit comments

Comments
 (0)